qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once
@ 2009-05-26 12:36 Kevin Wolf
  2009-05-26 12:36 ` [Qemu-devel] [PATCH 1/2] qcow2: Refactor update_refcount Kevin Wolf
  2009-05-26 12:36 ` [Qemu-devel] [PATCH 2/2] qcow2: Update multiple refcounts at once Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Wolf @ 2009-05-26 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-26 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 12:36 [Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once Kevin Wolf
2009-05-26 12:36 ` [Qemu-devel] [PATCH 1/2] qcow2: Refactor update_refcount Kevin Wolf
2009-05-26 12:36 ` [Qemu-devel] [PATCH 2/2] qcow2: Update multiple refcounts at once Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).