Skip to content

Use io_wq_work_list for task_work

Jens Axboe io-uring 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4io_uring: use the right type for work_llist empty checkio_uring/io_uring.h+1 -10 replies
2/4io_uring: switch deferred task_work to an io_wq_work_listinclude/linux/io_uring_types.h io_uring/io_uring.c io_uring/io_uring.h+51 -815 replies
3/4io_uring: switch fallback work to io_wq_work_listinclude/linux/io_uring_types.h io_uring/io_uring.c+20 -60 replies
4/4io_uring: switch normal task_work to io_wq_work_listinclude/linux/io_uring_types.h io_uring/io_uring.c io_uring/io_uring.h +2 more+43 -300 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCHSET 0/4] Use io_wq_work_list for task_work

Hi,

This converts the deferred, normal, and fallback task_work to use a normal io_wq_work_list, rather than an llist.

The main motivation behind this is to get rid of the need to reverse the list once it's deleted and run. I tested this basic conversion of just switching it from an llist to an io_wq_work_list with a spinlock, and I don't see any benefits from the lockless list. And for cases where we get a bursty addition of task_work, this approach is faster as it avoids the need to iterate the list upfront while reversing it.

And this is less code and simpler, so I'd prefer to go that route.

 include/linux/io_uring_types.h |  13 +--
 io_uring/io_uring.c            | 175 ++++++++++++++++-----------------
 io_uring/io_uring.h            |   8 +-
 io_uring/sqpoll.c              |   8 +-
 io_uring/tctx.c                |   3 +-
 5 files changed, 102 insertions(+), 105 deletions(-)
Signature · 1 line
Jens Axboe