From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v2 0/3] block: zero write detection
Date: Wed, 7 Dec 2011 12:10:56 +0000 [thread overview]
Message-ID: <1323259859-8709-1-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
This series adds an interface for optimized writes when data contains all
zeros. If zero detection is enabled a block driver can take extra steps to
represent zero regions efficiently.
The details of optimized zero representations depend on the image format but
the main block layer change is a field to indicate that zero detection should
be performed. (This can be CPU intensive since buffers are scanned for all
zeros and the feature is disabled by default.)
This series includes a patch for the QED image format that writes special "zero
clusters" and keeps the image file compact. In the future qcow2v3 could also
support an efficient zero representation.
My motivation for this feature is efficient image streaming. The destination
file must stay compact and not be bloated with clusters containing only zeroes
from the source file.
Kevin Wolf <kwolf@redhat.com> has suggested zero detection in the source image
to avoid scanning for zeroes when the source image has an efficient zero
representation. This is a complementary feature which can be introduced in the
future but does not work for raw files over NFS, for example. I see the
current series as the minimum support we need with extensions possible in the
future.
Here is a qemu-iotest to verify that zero write detection is working:
http://repo.or.cz/w/qemu-iotests/stefanha.git/commitdiff/226949695eef51bdcdea3e6ce3d7e5a863427f37
Stefan Hajnoczi (3):
block: add zero write detection interface
qed: add zero write detection support
qemu-io: add zero write detection option
block.c | 16 ++++++++++++
block.h | 3 ++
block/qed.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
block_int.h | 9 ++++++
qemu-io.c | 29 ++++++++++++++++-----
5 files changed, 122 insertions(+), 15 deletions(-)
--
1.7.7.3
next reply other threads:[~2011-12-07 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 12:10 Stefan Hajnoczi [this message]
2011-12-07 12:10 ` [Qemu-devel] [PATCH v2 1/3] block: add zero write detection interface Stefan Hajnoczi
2011-12-07 12:10 ` [Qemu-devel] [PATCH v2 2/3] qed: add zero write detection support Stefan Hajnoczi
2011-12-08 14:29 ` Mark Wu
2011-12-08 15:54 ` Stefan Hajnoczi
2011-12-07 12:10 ` [Qemu-devel] [PATCH v2 3/3] qemu-io: add zero write detection option Stefan Hajnoczi
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=1323259859-8709-1-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=mtosatti@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).