qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@gmail.com
Subject: [Qemu-devel] [PATCH v4 0/3] qcow2 metadata cache
Date: Thu, 20 Jan 2011 18:10:09 +0100	[thread overview]
Message-ID: <1295543412-24012-1-git-send-email-kwolf@redhat.com> (raw)

block-queue turned out to be too big effort to be useful for quickly fixing the
performance problems that qcow2 got since we introduced the metadata flushes.
While I still think the idea is right, it needs more time and qcow2 doesn't
have more time. Let's come back to block-queue later when the most urgent qcow2
problems are fixed.

So this is the idea of block-queue applied to the very specific case of qcow2.
Whereas block-queue tried to be a generic solution for all kind of things and
tried to make all writes asynchronous at the same time, this is only about
batching writes to refcount blocks and L2 tables in qcow2 and getting the
dependencies right. (Yes, the L1 table and refcount table is left alone. They
are almost never written to anyway.)

This should be much easier to understand and review, and I myself feel a bit
more confident about it than with block-queue, too.

v1:
- Don't read newly allocated tables from the disk before memsetting them to
  zero

v2:
- Addressed Stefan's review comments
- Added patch 3 to avoid an unnecessary bdrv_flush after COW

v3:
- Some error path fixes (esp. missing or double qcow2_cache_put)

v4:
- Pay attention to make writethrough performance not even worse in
  update_refcount
- Add some blkdebug events back so that "failures" in qemu-iotests are kept
  minimal. Some diff between master and this series is left in test 026, but
  it's harmless.

Kevin Wolf (3):
  qcow2: Add QcowCache
  qcow2: Use QcowCache
  qcow2: Batch flushes for COW

 Makefile.objs          |    2 +-
 block/qcow2-cache.c    |  314 ++++++++++++++++++++++++++++++++++++++++++++++++
 block/qcow2-cluster.c  |  207 +++++++++++---------------------
 block/qcow2-refcount.c |  258 ++++++++++++++++-----------------------
 block/qcow2.c          |   48 +++++++-
 block/qcow2.h          |   32 ++++-
 6 files changed, 564 insertions(+), 297 deletions(-)
 create mode 100644 block/qcow2-cache.c

-- 
1.7.2.3

             reply	other threads:[~2011-01-20 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 17:10 Kevin Wolf [this message]
2011-01-20 17:10 ` [Qemu-devel] [PATCH v4 1/3] qcow2: Add QcowCache Kevin Wolf
2011-01-24 14:00   ` Stefan Hajnoczi
2011-01-20 17:10 ` [Qemu-devel] [PATCH v4 2/3] qcow2: Use QcowCache Kevin Wolf
     [not found]   ` <AANLkTimeRQVVeNnRbaiRNQ-SbExyJDZiuteBP7wfv9He@mail.gmail.com>
2011-01-24 14:54     ` Kevin Wolf
2011-01-24 15:26       ` Stefan Hajnoczi
2011-01-24 15:36         ` Kevin Wolf
2011-01-24 15:39           ` Stefan Hajnoczi
2011-02-09 11:19   ` Avi Kivity
2011-02-09 11:23     ` Avi Kivity
2011-01-20 17:10 ` [Qemu-devel] [PATCH v4 3/3] qcow2: Batch flushes for COW 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=1295543412-24012-1-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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).