]> www.infradead.org Git - users/willy/xarray.git/commit
io_uring: limit local tw done
authorDavid Wei <dw@davidwei.uk>
Wed, 20 Nov 2024 22:14:52 +0000 (14:14 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Nov 2024 14:11:00 +0000 (07:11 -0700)
commitf46b9cdb22f7a167c36b6bcddaef7e8aee2598fa
tree77367fc483f6da2618919fbb331a2964cc09324f
parent40cfe553240b32333b42652370ef5232e6ac59e1
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>
include/linux/io_uring_types.h
io_uring/io_uring.c
io_uring/io_uring.h