qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once
Date: Tue, 26 May 2009 14:36:01 +0200	[thread overview]
Message-ID: <1243341363-6507-1-git-send-email-kwolf@redhat.com> (raw)

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	other threads:[~2009-05-26 12:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 12:36 Kevin Wolf [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1243341363-6507-1-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).