Commit d97ec623 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: kill extra wake_up_process in tw add

TWA_SIGNAL already wakes the thread, no need in wake_up_process() after
it.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7e90cf643f633e857443e0c9e72471b221735c50.1631115443.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c450178d
...@@ -2197,8 +2197,9 @@ static void io_req_task_work_add(struct io_kiocb *req) ...@@ -2197,8 +2197,9 @@ static void io_req_task_work_add(struct io_kiocb *req)
* will do the job. * will do the job.
*/ */
notify = (req->ctx->flags & IORING_SETUP_SQPOLL) ? TWA_NONE : TWA_SIGNAL; notify = (req->ctx->flags & IORING_SETUP_SQPOLL) ? TWA_NONE : TWA_SIGNAL;
if (!task_work_add(tsk, &tctx->task_work, notify)) { if (likely(!task_work_add(tsk, &tctx->task_work, notify))) {
wake_up_process(tsk); if (notify == TWA_NONE)
wake_up_process(tsk);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment