Skip to content

io_uring: use TWA_SIGNAL more carefully

Jens Axboe io-uring stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 38 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kernel: split task_work_add() into two separate helpersinclude/linux/task_work.h kernel/task_work.c+45 -225 replies
2/2io_uring: use TWA_SIGNAL for task_work if the task isn't runningfs/io_uring.c+14 -833 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 0/2] io_uring: use TWA_SIGNAL more carefully

Adding io_uring support to Netty, Josef noticed that there's another case where we can fail to process task_work in time. We previously added a "work-around" for eventfd, see:

b7db41c9e03b ("io_uring: fix regression with always ignoring signals in io_cqring_wait()")

but we can run into this dependency issue even without that. See the test case added to liburing:

https://git.kernel.dk/cgit/liburing/tree/test/wakeup-hang.c

for an example of that. This series adds a split way to call task_work_add(), so we can use TWA_SIGNAL if the task is currently not running. This over-reaches a bit since there are definitely cases where we do not need to use it, but better safe than sorry for now.

Signature · 1 line
Jens Axboe