io_uring: batch task_work
authorDylan Yudaken <dylany@fb.com>
Wed, 22 Jun 2022 13:40:25 +0000 (06:40 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jul 2022 14:44:34 +0000 (08:44 -0600)
commit47583fc525b4066539f530cc38c846fef30587dd
tree7a2a4524df0be45980756ae913e636240fbffeb3
parent977595c31bca7ab69efa6b4884c657bd73e825a1
io_uring: batch task_work

Batching task work up is an important performance optimisation, as
task_work_add is expensive.

In order to keep the semantics replace the task_list with a fake node
while processing the old list, and then do a cmpxchg at the end to see if
there is more work.

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220622134028.2013417-6-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c