Use io_wq_work_list for task_work
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | io_uring: use the right type for work_llist empty checkio_uring/ | +1 | 0 replies | |
| 2/4 | io_uring: switch deferred task_work to an io_wq_work_listinclude/ io_uring/ io_uring/ | +51 | 5 replies | |
| 3/4 | io_uring: switch fallback work to io_wq_work_listinclude/ io_uring/ | +20 | 0 replies | |
| 4/4 | io_uring: switch normal task_work to io_wq_work_listinclude/ io_uring/ io_uring/ +2 more | +43 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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