Re: [Qemu-devel] [PATCH v5 09/11] curl: add cache quota.

2013-05-23 Thread Stefan Hajnoczi
On Thu, May 23, 2013 at 11:38:07AM +0800, Fam Zheng wrote: > Introduce a cache quota: BDRVCURLState.cache_quota. > When adding new CURLDataCache to BDRVCURLState, if number of existing > CURLDataCache is larger than CURL_CACHE_QUOTA, try to release some first > to limit the in memory cache size. >

[Qemu-devel] [PATCH v5 09/11] curl: add cache quota.

2013-05-22 Thread Fam Zheng
Introduce a cache quota: BDRVCURLState.cache_quota. When adding new CURLDataCache to BDRVCURLState, if number of existing CURLDataCache is larger than CURL_CACHE_QUOTA, try to release some first to limit the in memory cache size. A least used entry is selected for releasing. Signed-off-by: Fam Zh