On 13/10/2020 09:43, Pavel Begunkov wrote: > This removes REQ_F_COMP_LOCKED to fix a couple of problems with it. > > [5/5] is harsh and some work should be done to ease the aftermath, > i.e. io_submit_flush_completions() and maybe fail_links(). > > Another way around would be to replace the flag with an comp_locked > argument in put_req(), free_req() and so on, but IMHO in a long run > removing it should be better. > > note: there is a new io_req_task_work_add() call in [5/5]. Jens, > could you please verify whether passed @twa_signal_ok=true is ok, > because I don't really understand the difference. btw, when I copied task_work_add(TWA_RESUME) from __io_free_req(), tasks were hanging sleeping uninterruptibly, and fail_links() wasn't waking them. It looks like the deferring branch of __io_free_req() is buggy as well and should use io_req_task_work_add(). > > Pavel Begunkov (5): > io_uring: don't set COMP_LOCKED if won't put > io_uring: don't unnecessarily clear F_LINK_TIMEOUT > io_uring: don't put a poll req under spinlock > io_uring: dig out COMP_LOCK from deep call chain > io_uring: fix REQ_F_COMP_LOCKED by killing it > > fs/io_uring.c | 158 ++++++++++++++++++-------------------------------- > 1 file changed, 57 insertions(+), 101 deletions(-) > -- Pavel Begunkov