diff options
author | David Wei <dw@davidwei.uk> | 2024-11-20 14:14:52 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-21 07:11:00 -0700 |
commit | f46b9cdb22f7a167c36b6bcddaef7e8aee2598fa (patch) | |
tree | 77367fc483f6da2618919fbb331a2964cc09324f /include | |
parent | 40cfe553240b32333b42652370ef5232e6ac59e1 (diff) | |
download | lwn-f46b9cdb22f7a167c36b6bcddaef7e8aee2598fa.tar.gz lwn-f46b9cdb22f7a167c36b6bcddaef7e8aee2598fa.zip |
io_uring: limit local tw done
Instead of eagerly running all available local tw, limit the amount of
local tw done to the max of IO_LOCAL_TW_DEFAULT_MAX (20) or wait_nr. The
value of 20 is chosen as a reasonable heuristic to allow enough work
batching but also keep latency down.
Add a retry_llist that maintains a list of local tw that couldn't be
done in time. No synchronisation is needed since it is only modified
within the task context.
Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://lore.kernel.org/r/20241120221452.3762588-3-dw@davidwei.uk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/io_uring_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h index aa5f5ea98076..3e934feb3187 100644 --- a/include/linux/io_uring_types.h +++ b/include/linux/io_uring_types.h @@ -335,6 +335,7 @@ struct io_ring_ctx { */ struct { struct llist_head work_llist; + struct llist_head retry_llist; unsigned long check_cq; atomic_t cq_wait_nr; atomic_t cq_timeouts; |