qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once
Date: Tue, 26 May 2009 14:36:01 +0200

When updating the refcount of a range of cluste, qcow2 currently processes
single clusters, so for each cluster there is a separate write to the dis
image. This series changes this behaviour to change the refcount of all cluters
in the same refcount block before writing anything to disk, saving some write
operations.

The influence of this change is highest when lots of large request frequently
allocate multiple clusters at once - growing an empty image during FS creation
or installation. The allocation itself is already optimized for this case,
refcount updates are an important missing piece: I trief mke2fs on an empty
image (cache=off) and it went down from 7:15 min to 1:59 min. Even with
writeback caching we still gain a small percentage (with the right qemu-io test
case even a huge one, but I guess this doesn't matter in practice).

I'm fairly confident that this series is correct, it has passed the test
scripts I have here and some manual testing. However, given the recent qcow2
history I don't feel completely comfortable with touching this part of qcow2,
so please run this with all test cases you all have for it. And give it a
thorough review, of course.

Kevin Wolf (2):
  qcow2: Refactor update_refcount
  qcow2: Update multiple refcounts at once

 block/qcow2.c |  118 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 88 insertions(+), 30 deletions(-)





reply via email to

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