diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-02-10 01:03:20 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-10 15:28:43 +0100 |
commit | 7cbf1722d5fc5779946ee8f338e9e38b5de15856 (patch) | |
tree | cafc7b4a2cc122789ca7c1b2045d44ec2a36847a /fs/io-wq.h | |
parent | io_uring: use persistent request cache (diff) | |
download | linux-7cbf1722d5fc5779946ee8f338e9e38b5de15856.tar.xz linux-7cbf1722d5fc5779946ee8f338e9e38b5de15856.zip |
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>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r-- | fs/io-wq.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h index e37a0f217cc8..096f1021018e 100644 --- a/fs/io-wq.h +++ b/fs/io-wq.h @@ -27,15 +27,6 @@ enum io_wq_cancel { IO_WQ_CANCEL_NOTFOUND, /* work not found */ }; -struct io_wq_work_node { - struct io_wq_work_node *next; -}; - -struct io_wq_work_list { - struct io_wq_work_node *first; - struct io_wq_work_node *last; -}; - static inline void wq_list_add_after(struct io_wq_work_node *node, struct io_wq_work_node *pos, struct io_wq_work_list *list) |