diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-04-25 23:34:46 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-26 06:59:25 -0600 |
commit | 9f59a9d88d3bb2708d08e0e1d03899c469c27190 (patch) | |
tree | 73b49f0805107b074112981b1fb40700200e086c /fs/exec.c | |
parent | 28090c133869b461c5366195a856d73469ab87d9 (diff) |
io_uring: simplify SQPOLL cancellations
All sqpoll rings (even sharing sqpoll task) are currently dead bound
to the task that created them, iow when owner task dies it kills all
its SQPOLL rings and their inflight requests via task_work infra. It's
neither the nicist way nor the most convenient as adds extra
locking/waiting and dependencies.
Leave it alone and rely on SIGKILL being delivered on its thread group
exit, so there are only two cases left:
1) thread group is dying, so sqpoll task gets a signal and exit itself
cancelling all requests.
2) an sqpoll ring is dying. Because refs_kill() is called the sqpoll not
going to submit any new request, and that's what we need. And
io_ring_exit_work() will do all the cancellation itself before
actually killing ctx, so sqpoll doesn't need to worry about it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3cd7f166b9c326a2c932b70e71a655b03257b366.1619389911.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/exec.c')
0 files changed, 0 insertions, 0 deletions