From: Peter Lieven <pl@kamp.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes
Date: Tue, 25 Feb 2014 18:03:16 +0100 [thread overview]
Message-ID: <530CCCD4.5080104@kamp.de> (raw)
In-Reply-To: <20140225134157.GE3339@dhcp-200-207.str.redhat.com>
Am 25.02.2014 14:41, schrieb Kevin Wolf:
> Am 24.02.2014 um 14:01 hat Peter Lieven geschrieben:
>> On 24.02.2014 11:38, Paolo Bonzini wrote:
>>> Il 24/02/2014 11:26, Peter Lieven ha scritto:
>>>> I personally do not need this for QCOW2 but for iSCSI. Here the optimization
>>>> is basically saved bandwidth since a zero write becomes a WRITESAME.
>>> It saves bandwidth, but at the potential cost of extra host CPU
>>> utilization. I would be fine with having this automatically, but
>>> drv->bdrv_co_write_zeroes is not the right check because it is
>>> true for qcow2 and raw formats. Something using bdrv_get_info is
>>> probably better, because it would have fewer or no false
>>> positives.
>>>
>>>> In all cases if unmap=on it would additionally save disk space.
>>> It would also cause worse performance though. I think the automatic addition BDRV_REQ_MAY_UNMAP is what should be a separate option. Perhaps you can have a three-state option, detect-zeros=no/yes/unmap.
>> What would be the desired way to store this flag in the BlockDriverState?
> Some new enum field?
Is there an already implemented example where I can copy from? Its quite diffucult to search through all the involved
functions when doing it for the first time.
Peter
prev parent reply other threads:[~2014-02-25 17:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 13:00 [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes Peter Lieven
2014-02-22 16:45 ` Fam Zheng
2014-02-23 19:10 ` Peter Lieven
2014-02-24 1:01 ` Fam Zheng
2014-02-24 10:39 ` Paolo Bonzini
2014-02-24 11:33 ` Fam Zheng
2014-02-24 11:51 ` Paolo Bonzini
2014-02-24 12:04 ` Fam Zheng
2014-02-24 12:07 ` Kevin Wolf
2014-02-24 12:10 ` Paolo Bonzini
2014-02-24 12:22 ` Kevin Wolf
2014-02-24 10:11 ` Kevin Wolf
2014-02-24 10:26 ` Peter Lieven
2014-02-24 10:38 ` Paolo Bonzini
2014-02-24 11:50 ` Peter Lieven
2014-02-24 13:01 ` Peter Lieven
2014-02-25 13:41 ` Kevin Wolf
2014-02-25 17:03 ` Peter Lieven [this message]
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=530CCCD4.5080104@kamp.de \
--to=pl@kamp.de \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).