Skip to content

RFC io_uring specific task_work infra

Pavel Begunkov io-uring 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11io_uring: optimise io_req_task_work_addfs/io_uring.c+3 -40 replies
2/11io_uringg: add io_should_fail_tw() helperfs/io_uring.c+9 -50 replies
3/11io_uring: ban tw queue for exiting processesfs/io_uring.c+9 -60 replies
4/11io_uring: don't take ctx refs in tctx_task_work()fs/io_uring.c+0 -30 replies
5/11io_uring: add dummy io_uring_task_work_run()include/linux/io_uring.h+4 -00 replies
6/11task_work: add helper for signalling a taskinclude/linux/task_work.h kernel/task_work.c+22 -140 replies
7/11io_uring: run io_uring task_works on TIF_NOTIFY_SIGNALfs/io-wq.c fs/io_uring.c include/linux/task_work.h +2 more+6 -00 replies
8/11io_uring: wire io_uring specific task workfs/io_uring.c include/linux/io_uring.h+30 -280 replies
9/11io_uring: refactor io_run_task_work()fs/io_uring.c+5 -30 replies
10/11io_uring: remove priority tw listfs/io_uring.c+8 -530 replies
11/11io_uring: lock-free task_work stackfs/io_uring.c+56 -640 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 00/11] io_uring specific task_work infra

For experiments only. If proves to be useful would need to make it nicer on the non-io_uring side.

0-10 save 1 spinlock/unlock_irq pair and 2 cmpxchg per batch. 11/11 in general trades 1 per tw add spin_lock/unlock_irq and 2 per batch spinlocking with 2 cmpxchg to 1 per tw add cmpxchg and 1 per batch cmpxchg.

Pavel Begunkov (11):
io_uring: optimise io_req_task_work_add
io_uringg: add io_should_fail_tw() helper
io_uring: ban tw queue for exiting processes
io_uring: don't take ctx refs in tctx_task_work()
io_uring: add dummy io_uring_task_work_run()
task_work: add helper for signalling a task
io_uring: run io_uring task_works on TIF_NOTIFY_SIGNAL
io_uring: wire io_uring specific task work
io_uring: refactor io_run_task_work()
io_uring: remove priority tw list
io_uring: lock-free task_work stack

 fs/io-wq.c                |   1 +
 fs/io_uring.c             | 213 +++++++++++++++-----------------------
 include/linux/io_uring.h  |   4 +
 include/linux/task_work.h |   4 +
 kernel/entry/kvm.c        |   1 +
 kernel/signal.c           |   2 +
 kernel/task_work.c        |  33 +++---
 7 files changed, 115 insertions(+), 143 deletions(-)
Signature · 1 line
2.36.0