Commit 98351def authored by David Wei's avatar David Wei Committed by Akilesh Kailash
Browse files

BACKPORT: 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.

Bug: 450109138
Bug: 297114355
(cherry picked from commit f46b9cdb)
Signed-off-by: default avatarDavid Wei <dw@davidwei.uk>
Link: https://lore.kernel.org/r/20241120221452.3762588-3-dw@davidwei.uk


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
[akailash@: Fix merge conflicts in __io_run_local_work and
io_move_task_work_from_local ]
Cherrypick-From: https://android-review.googlesource.com/q/commit:65c7af157b51d0aad90671572f5a6a1f4760f639


Merged-In: I885d0bc34236d84831c092793b1e427a581b560b
Change-Id: I885d0bc34236d84831c092793b1e427a581b560b
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
parent 3849de23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment