On Tue, 05/14 10:22, Stefan Hajnoczi wrote:
> On Tue, May 14, 2013 at 10:26:19AM +0800, Fam Zheng wrote:
> >  - CURLDataCache holds the user data read from libcurl, it is in a list
> >    ordered by access, the used cache is moved to list head on access, so
> >    the tail element is freed first. BDRVCURLState.cache_quota is the
> >    threshold to start freeing cache.
> 
> Can you explain the need for a cache?
> 
> The guest kernel already does readahead if it wants to.  It can be tuned
> from inside the guest if performance doesn't meet expectations.  The
> block/curl.c-specific cache cannot be tuned from the guest.
> 

It's prefetch. If we send request for every read request, there'll be
too much overhead for protocal transactions.

I just name it CURLDataCache. Guest may have multiple sequencial reads,
so I used a list of it.

If you think this is reasonable, I'll update the commit messages on this.

-- 
Fam

Reply via email to