qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, famz@redhat.com,
	stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCHv4] block: optimize zero writes with bdrv_write_zeroes
Date: Tue, 13 May 2014 14:06:17 +0200	[thread overview]
Message-ID: <53720AB9.4040508@kamp.de> (raw)
In-Reply-To: <53712EFC.5080108@redhat.com>

On 12.05.2014 22:28, Eric Blake wrote:
> On 05/08/2014 10:22 AM, Peter Lieven wrote:
>> this patch tries to optimize zero write requests
>> by automatically using bdrv_write_zeroes if it is
>> supported by the format.
>>
>> This significantly speeds up file system initialization and
>> should speed zero write test used to test backend storage
>> performance.
>>
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>> v3->v4: - use QAPI generated enum and lookup table [Kevin]
>>          - added more details about the options in the comments
>>            of the qapi-schema [Eric]
>>          - changed the type of detect_zeroes from str to
>>            BlockdevDetectZeroesOptions. I left the name
>>            as is because it is consistent with e.g.
>>            BlockdevDiscardOptions or BlockdevAioOptions [Eric]
>>          - changed the parse function in blockdev_init to
>>            be generic usable for other enum parameters
> If you wouldn't mind, I think the generic function is useful enough that
> people might want to backport it independently from this optimization.
> It would be better to split this into a two-patch series, one for the
> new parse_enum_option, the other for bdrv_write_zeroes utilizing it.
>
>
>> +        },{
>> +            .name = "detect-zeroes",
>> +            .type = QEMU_OPT_STRING,
>> +            .help = "try to optimize zero writes",
> Might be worth listing (off, on, unmap) in the text.
>
> Everything else looked okay, but I'll wait for R-b until I see a
> response about the idea of splitting the patch (even if that response is
> justification for keeping it as one)
>

I did not split because currently there is no other possible
user in the function. The on_error settings and discard settings
would be possible users, but for on_error there is a hardcoded
difference between read and write which is not reflected in the
qapi and for discard settings we have ignore and unmap, but
we have also off and on which are not in qapi as well.

Peter

  reply	other threads:[~2014-05-13 12:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 16:22 [Qemu-devel] [PATCHv4] block: optimize zero writes with bdrv_write_zeroes Peter Lieven
2014-05-12 20:28 ` Eric Blake
2014-05-13 12:06   ` Peter Lieven [this message]
2014-05-14 13:15     ` Eric Blake
2014-05-14 11:41 ` Kevin Wolf
2014-05-15  5:16   ` Peter Lieven
2014-05-15  9:54     ` Kevin Wolf
2014-05-15 21:20       ` Peter Lieven

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=53720AB9.4040508@kamp.de \
    --to=pl@kamp.de \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --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).