]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: provide FIFO ordering for task_work
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 00:03:20 +0000 (00:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:28:43 +0000 (07:28 -0700)
commitdbe6541525848a1b8d01916f663dc94cf053763c
treecafc7b4a2cc122789ca7c1b2045d44ec2a36847a
parent73cc2cc1610454c91ee9ca564e5386618b64b895
io_uring: provide FIFO ordering for task_work

task_work is a LIFO list, due to how it's implemented as a lockless
list. For long chains of task_work, this can be problematic as the
first entry added is the last one processed. Similarly, we'd waste
a lot of CPU cycles reversing this list.

Wrap the task_work so we have a single task_work entry per task per
ctx, and use that to run it in the right order.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.h
fs/io_uring.c
include/linux/io_uring.h