qemu-devel
[Top][All Lists]
Advanced

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

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


From: Max Reitz
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/7] qcow2: use one single memory block for the L2/refcount cache tables
Date: Fri, 08 May 2015 17:03:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 06.05.2015 15:39, 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: Max Reitz <address@hidden>



reply via email to

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