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?