From: Kevin Wolf <kwolf@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
Markus Armbruster <armbru@redhat.com>,
Hanna Reitz <hreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH 1/3] file-posix: add `aio-max-batch` option
Date: Mon, 25 Oct 2021 16:04:21 +0200 [thread overview]
Message-ID: <YXa5ZesOSr/gd6v3@redhat.com> (raw)
In-Reply-To: <20211025102006.hc6vjbqze3u7mqpr@steredhat>
Am 25.10.2021 um 12:20 hat Stefano Garzarella geschrieben:
> On Thu, Oct 21, 2021 at 04:18:41PM +0100, Stefan Hajnoczi wrote:
> > On Thu, Sep 23, 2021 at 04:30:58PM +0200, Stefano Garzarella wrote:
> > > Commit d7ddd0a161 ("linux-aio: limit the batch size using
> > > `aio-max-batch` parameter") added a way to limit the batch size
> > > of Linux AIO backend for the entire AIO context.
> > >
> > > The same AIO context can be shared by multiple devices, so
> > > latency-sensitive devices may want to limit the batch size even
> > > more to avoid increasing latency.
> > >
> > > For this reason we add the `aio-max-batch` option to the file
> > > backend, which will be used by the next commits to limit the size of
> > > batches including requests generated by this device.
> > >
> > > Suggested-by: Kevin Wolf <kwolf@redhat.com>
> > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> > > ---
> > > qapi/block-core.json | 5 +++++
> > > block/file-posix.c | 9 +++++++++
> > > 2 files changed, 14 insertions(+)
> > >
> > > diff --git a/qapi/block-core.json b/qapi/block-core.json
> > > index c8ce1d9d5d..1a8ed325bc 100644
> > > --- a/qapi/block-core.json
> > > +++ b/qapi/block-core.json
> > > @@ -2851,6 +2851,10 @@
> > > # for this device (default: none, forward the commands via SG_IO;
> > > # since 2.11)
> > > # @aio: AIO backend (default: threads) (since: 2.8)
> > > +# @aio-max-batch: maximum number of requests in an AIO backend batch that
> > > +# contains request from this block device. 0 means that the
> >
> > The first sentence is a little unclear. I guess s/request/requests/ but
> > that still doesn't doesn't fully explain how this works.
> >
> > Does the AIO backend use the minimum aio-max-batch value of all its
> > blockdevs?
>
> It's a little simpler to avoid having to recalculate the minimum for each
> attach/release of blockdevs.
>
> When the blockdev does submit or unplug, the queue is flushed if the number
> of requests in the batch is greater or equal then the smallest aio-max-batch
> value of the blockdev and the AIO context.
>
> >
> > Maybe:
> >
> > maximum number of requests to batch together into a single submission
> > in the AIO backend. If multiple BlockdevOptionsFile sharing an AIO
> > backend have different values the smallest value is chosen. ...
>
> Whath about this:
>
> maximum number of requests to batch together into a single submission
> in the AIO backend. The smallest value between this and AIO context's
> aio-max-batch value is chosen. ...
I like this, except that AioContexts are an implementation detail. I
think we should refer to the iothread object instead, which is the user
visible interface to AioContexts.
Kevin
next prev parent reply other threads:[~2021-10-25 14:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 14:30 [PATCH 0/3] linux-aio: allow block devices to limit aio-max-batch Stefano Garzarella
2021-09-23 14:30 ` [PATCH 1/3] file-posix: add `aio-max-batch` option Stefano Garzarella
2021-10-21 15:18 ` Stefan Hajnoczi
2021-10-25 10:20 ` Stefano Garzarella
2021-10-25 14:04 ` Kevin Wolf [this message]
2021-10-25 14:40 ` Stefano Garzarella
2021-09-23 14:30 ` [PATCH 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit() Stefano Garzarella
2021-10-21 15:19 ` Stefan Hajnoczi
2021-09-23 14:31 ` [PATCH 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug() Stefano Garzarella
2021-10-21 15:20 ` Stefan Hajnoczi
2021-10-14 9:32 ` [PATCH 0/3] linux-aio: allow block devices to limit aio-max-batch Stefano Garzarella
2021-10-21 15:21 ` Stefan Hajnoczi
2021-10-25 14:16 ` Kevin Wolf
2021-10-25 14:42 ` Stefano Garzarella
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=YXa5ZesOSr/gd6v3@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--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).