All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 2/6] block: add .bdrv_co_write_zeroes() interface
Date: Mon, 06 Feb 2012 17:00:27 +0100	[thread overview]
Message-ID: <4F2FF91B.5050203@redhat.com> (raw)
In-Reply-To: <CAJSP0QXSbtjoCk3JPp7SiY+vU577zAXwUuntmhQXB5mZmR6bxQ@mail.gmail.com>

Am 06.02.2012 16:50, schrieb Stefan Hajnoczi:
> On Tue, Jan 24, 2012 at 3:16 PM, Kevin Wolf <kwolf@redhat.com> wrote:
>>> +/*
>>> + * Efficiently zero a region of the disk image.  Note that this is a regular
>>> + * I/O request like read or write and should have a reasonable size.  This
>>> + * function is not suitable for zeroing the entire image in a single request.
>>> + */
>>
>> The reason for this is that in the fallback case you allocate memory for
>> the whole request, right? So what about just limiting the allocation in
>> bdrv_co_do_write_zeroes() to a reasonable size and putting a loop there
>> for large requests?
> 
> I'd rather not do that yet.  We don't have a reasonable way to cancel
> such a request yet.  In the future, if we decide we'd like to do huge
> bdrv_co_write_zeroes(), we could look at the details of making this
> work.

Do we even need a way to cancel such requests?

But anyway, include the reason in the comment, then we can leave it as
it is.

Kevin

  reply	other threads:[~2012-02-06 15:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 14:59 [Qemu-devel] [PATCH v4 0/6] block: zero writes Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 1/6] cutils: extract buffer_is_zero() from qemu-img.c Stefan Hajnoczi
2012-01-24 15:03   ` Kevin Wolf
2012-02-06 15:37     ` Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 2/6] block: add .bdrv_co_write_zeroes() interface Stefan Hajnoczi
2012-01-24 15:16   ` Kevin Wolf
2012-02-06 15:50     ` Stefan Hajnoczi
2012-02-06 16:00       ` Kevin Wolf [this message]
2012-02-06 16:16         ` Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 3/6] block: perform zero-detection during copy-on-read Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 4/6] qed: replace is_write with flags field Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 5/6] qed: add .bdrv_co_write_zeroes() support Stefan Hajnoczi
2012-01-18 14:59 ` [Qemu-devel] [PATCH v4 6/6] qemu-io: add write -z option for bdrv_co_write_zeroes 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=4F2FF91B.5050203@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.