qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH 0/6] qcow2 L2/refcount cache improv


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 0/6] qcow2 L2/refcount cache improvements
Date: Wed, 6 May 2015 17:43:34 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Apr 30, 2015 at 01:11:39PM +0300, Alberto Garcia wrote:
> Here are some improvements to the qcow2 L2/refcount cache code.
> 
> The first one is that all cache tables are now allocated using a
> single memory block, as we discussed last week.
> 
> Apart from a more efficient use of memory, this allows some additional
> optimizations so I took the chance to make other changes.
> 
> - qcow2_cache_put() and qcow2_cache_entry_mark_dirty() are now O(1)
> - The eviction algorithm is now LRU. The previous one only works well
>   with very small cache sizes.
> - qcow2_cache_find_entry_to_replace() is no longer necessary.
> - Lookups are faster now.
> 
> In my tests with a preallocated 128MB L2 cache in an empty drive the
> new code is ~13% faster than the previous one (~43% if compiled
> without optimizations). This is a best-case scenario, if the cache is
> smaller or the drive is full of data the improvements are not so
> visible, but I believe the code is simpler now so I hope you find the
> changes worthwhile.

Overall I'm happy with this approach.  Looking forward to the next
revision.

Stefan

Attachment: pgpAqNafByphd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]