[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] curl: fix curl read
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH] curl: fix curl read |
Date: |
Wed, 15 May 2013 11:29:29 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, 05/09 17:16, Stefan Hajnoczi wrote:
> On Thu, May 09, 2013 at 02:56:50PM +0800, Fam Zheng wrote:
> > On Thu, 05/09 08:41, Stefan Hajnoczi wrote:
> > > On Fri, May 03, 2013 at 04:00:09PM +0800, Fam Zheng wrote:
> > > > + cache = curl_find_cache(s, aio_base, aio_bytes);
> > > > + if (cache) {
> > > > + curl_complete_io(s, acb, cache);
> > > > + return;
> > > > }
> > >
> > > What is the point of the cache? Can you split it into a separate patch?
> >
> > The cache is for prefetch. Data is fetched by 256k chunks using libcurl
> > and stored in cache to fill future io request, reducing overall http
> > request overhead.
>
> That sounds like a performance optimization which is not part of fixing
> broken block/curl.c :).
>
I didn't invent it here. Read ahead is already in curl.c, (see
BDRVCURLState.readahead_size). I don't think it's time to remove it here
either, but rename to a better name should be OK. What do you think?
BTW please keep me CC'ed when reply so that I can notice it better.
--
Fam