qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/7] qcow2: use one single memory block for the


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 1/7] qcow2: use one single memory block for the L2/refcount cache tables
Date: Thu, 7 May 2015 11:14:55 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 06, 2015 at 04:39:25PM +0300, Alberto Garcia wrote:
> The qcow2 L2/refcount cache contains one separate table for each cache
> entry. Doing one allocation per table adds unnecessary overhead and it
> also requires us to store the address of each table separately.
> 
> Since the size of the cache is constant during its lifetime, it's
> better to have an array that contains all the tables using one single
> allocation.
> 
> In my tests measuring freshly created caches with sizes 128MB (L2) and
> 32MB (refcount) this uses around 10MB of RAM less.
> 
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
>  block/qcow2-cache.c    | 55 
> ++++++++++++++++++++++++--------------------------
>  block/qcow2-cluster.c  | 12 +++++------
>  block/qcow2-refcount.c |  8 +++++---
>  block/qcow2.h          |  3 ++-
>  4 files changed, 39 insertions(+), 39 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: pgpYs3vcajhM1.pgp
Description: PGP signature


reply via email to

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