diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-04-09 18:14:00 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-09 18:45:27 -0600 |
commit | 85faa7b8346ebef0606d2d0df6d3f8c76acb3654 (patch) | |
tree | 5889b4560c5d4c6be271181d7d48dd350e88dd4a /kernel/sched | |
parent | c398ecb3d611925e4a5411afdf7489914a5c0460 (diff) |
io_uring: punt final io_ring_ctx wait-and-free to workqueue
We can't reliably wait in io_ring_ctx_wait_and_kill(), since the
task_works list isn't ordered (in fact it's LIFO ordered). We could
either fix this with a separate task_works list for io_uring work, or
just punt the wait-and-free to async context. This ensures that
task_work that comes in while we're shutting down is processed
correctly. If we don't go async, we could have work past the fput()
work for the ring that depends on work that won't be executed until
after we're done with the wait-and-free. But as this operation is
blocking, it'll never get a chance to run.
This was reproduced with hundreds of thousands of sockets running
memcached, haven't been able to reproduce this synthetically.
Reported-by: Dan Melnic <dmm@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/sched')
0 files changed, 0 insertions, 0 deletions