[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option |
Date: |
Wed, 27 Oct 2021 06:28:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Stefano Garzarella <sgarzare@redhat.com> writes:
> 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>
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>
> Notes:
> v2:
> - @aio-max-batch documentation rewrite [Stefan, Kevin]
>
> qapi/block-core.json | 7 +++++++
> block/file-posix.c | 9 +++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 6d3217abb6..fef76b0ea2 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -2896,6 +2896,12 @@
> # 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 to batch together into a single
> +# submission in the AIO backend. The smallest value between
> +# this and the aio-max-batch value of the IOThread object is
> +# chosen.
> +# 0 means that the AIO backend will handle it automatically.
> +# (default: 0, since 6.2)
"(default 0) (since 6.2)" seems to be more common.
> # @locking: whether to enable file locking. If set to 'auto', only enable
> # when Open File Descriptor (OFD) locking API is available
> # (default: auto, since 2.10)
> @@ -2924,6 +2930,7 @@
> '*pr-manager': 'str',
> '*locking': 'OnOffAuto',
> '*aio': 'BlockdevAioOptions',
> + '*aio-max-batch': 'int',
> '*drop-cache': {'type': 'bool',
> 'if': 'CONFIG_LINUX'},
> '*x-check-cache-dropped': 'bool' },
[PATCH v2 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug(), Stefano Garzarella, 2021/10/26
[PATCH v2 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit(), Stefano Garzarella, 2021/10/26