diff options
author | Peter Maydell | 2021-07-21 15:13:32 +0200 |
---|---|---|
committer | Peter Maydell | 2021-07-21 15:13:32 +0200 |
commit | 29c7daa00722e84a54f16cd0df46d289146dcda1 (patch) | |
tree | a83678a510ddec992140935cbc3e5d66f23cc34f /include | |
parent | Merge remote-tracking branch 'remotes/cleber-gitlab/tags/python-next-pull-req... (diff) | |
parent | linux-aio: limit the batch size using `aio-max-batch` parameter (diff) | |
download | qemu-29c7daa00722e84a54f16cd0df46d289146dcda1.tar.gz qemu-29c7daa00722e84a54f16cd0df46d289146dcda1.tar.xz qemu-29c7daa00722e84a54f16cd0df46d289146dcda1.zip |
Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging
Pull request
Stefano's performance regression fix for commit 2558cb8dd4 ("linux-aio:
increasing MAX_EVENTS to a larger hardcoded value").
# gpg: Signature made Wed 21 Jul 2021 14:12:47 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha-gitlab/tags/block-pull-request:
linux-aio: limit the batch size using `aio-max-batch` parameter
iothread: add aio-max-batch parameter
iothread: generalize iothread_set_param/iothread_get_param
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/aio.h | 12 | ||||
-rw-r--r-- | include/sysemu/iothread.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/block/aio.h b/include/block/aio.h index 807edce9b5..47fbe9d81f 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -232,6 +232,9 @@ struct AioContext { int64_t poll_grow; /* polling time growth factor */ int64_t poll_shrink; /* polling time shrink factor */ + /* AIO engine parameters */ + int64_t aio_max_batch; /* maximum number of requests in a batch */ + /* * List of handlers participating in userspace polling. Protected by * ctx->list_lock. Iterated and modified mostly by the event loop thread @@ -755,4 +758,13 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, int64_t grow, int64_t shrink, Error **errp); +/** + * aio_context_set_aio_params: + * @ctx: the aio context + * @max_batch: maximum number of requests in a batch, 0 means that the + * engine will use its default + */ +void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch, + Error **errp); + #endif diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index f177142f16..7f714bd136 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -37,6 +37,9 @@ struct IOThread { int64_t poll_max_ns; int64_t poll_grow; int64_t poll_shrink; + + /* AioContext AIO engine parameters */ + int64_t aio_max_batch; }; typedef struct IOThread IOThread; |