mbox series

[0/3] linux-aio: allow block devices to limit aio-max-batch

Message ID 20210923143100.182979-1-sgarzare@redhat.com (mailing list archive)
Headers show
Series linux-aio: allow block devices to limit aio-max-batch | expand

Message

Stefano Garzarella Sept. 23, 2021, 2:30 p.m. UTC
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.

This series add the `aio-max-batch` option to the file backend,
and use it in laio_co_submit() and laio_io_unplug() to limit the
Linux AIO batch size more than the limit set by the AIO context.

Stefano Garzarella (3):
  file-posix: add `aio-max-batch` option
  linux-aio: add `dev_max_batch` parameter to laio_co_submit()
  linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

 qapi/block-core.json    |  5 +++++
 include/block/raw-aio.h |  6 ++++--
 block/file-posix.c      | 14 ++++++++++++--
 block/linux-aio.c       | 38 +++++++++++++++++++++++++++-----------
 4 files changed, 48 insertions(+), 15 deletions(-)

Comments

Stefano Garzarella Oct. 14, 2021, 9:32 a.m. UTC | #1
Kind ping :-)

Thanks,
Stefano

On Thu, Sep 23, 2021 at 4:31 PM Stefano Garzarella <sgarzare@redhat.com> 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.
>
> This series add the `aio-max-batch` option to the file backend,
> and use it in laio_co_submit() and laio_io_unplug() to limit the
> Linux AIO batch size more than the limit set by the AIO context.
>
> Stefano Garzarella (3):
>   file-posix: add `aio-max-batch` option
>   linux-aio: add `dev_max_batch` parameter to laio_co_submit()
>   linux-aio: add `dev_max_batch` parameter to laio_io_unplug()
>
>  qapi/block-core.json    |  5 +++++
>  include/block/raw-aio.h |  6 ++++--
>  block/file-posix.c      | 14 ++++++++++++--
>  block/linux-aio.c       | 38 +++++++++++++++++++++++++++-----------
>  4 files changed, 48 insertions(+), 15 deletions(-)
>
> --
> 2.31.1
>
>
Stefan Hajnoczi Oct. 21, 2021, 3:21 p.m. UTC | #2
On Thu, Sep 23, 2021 at 04:30:57PM +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.
> 
> This series add the `aio-max-batch` option to the file backend,
> and use it in laio_co_submit() and laio_io_unplug() to limit the
> Linux AIO batch size more than the limit set by the AIO context.
> 
> Stefano Garzarella (3):
>   file-posix: add `aio-max-batch` option
>   linux-aio: add `dev_max_batch` parameter to laio_co_submit()
>   linux-aio: add `dev_max_batch` parameter to laio_io_unplug()
> 
>  qapi/block-core.json    |  5 +++++
>  include/block/raw-aio.h |  6 ++++--
>  block/file-posix.c      | 14 ++++++++++++--
>  block/linux-aio.c       | 38 +++++++++++++++++++++++++++-----------
>  4 files changed, 48 insertions(+), 15 deletions(-)

Sorry for the slow review. Comments posted!

Stefan
Kevin Wolf Oct. 25, 2021, 2:16 p.m. UTC | #3
Am 23.09.2021 um 16:30 hat Stefano Garzarella geschrieben:
> 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.
> 
> This series add the `aio-max-batch` option to the file backend,
> and use it in laio_co_submit() and laio_io_unplug() to limit the
> Linux AIO batch size more than the limit set by the AIO context.

Looks like you're only going to improve the wording for the QAPI
documentation for v2, so feel free to add:

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Stefano Garzarella Oct. 25, 2021, 2:42 p.m. UTC | #4
On Mon, Oct 25, 2021 at 04:16:54PM +0200, Kevin Wolf wrote:
>Am 23.09.2021 um 16:30 hat Stefano Garzarella geschrieben:
>> 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.
>>
>> This series add the `aio-max-batch` option to the file backend,
>> and use it in laio_co_submit() and laio_io_unplug() to limit the
>> Linux AIO batch size more than the limit set by the AIO context.
>
>Looks like you're only going to improve the wording for the QAPI
>documentation for v2, so feel free to add:
>
>Reviewed-by: Kevin Wolf <kwolf@redhat.com>
>

Yep, I'll add your R-b in the v2 :-)

Thanks,
Stefano