projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c450178
)
io_uring: kill extra wake_up_process in tw add
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 8 Sep 2021 15:40:53 +0000
(16:40 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:52 +0000
(
05:49
-0600)
TWA_SIGNAL already wakes the thread, no need in wake_up_process() after
it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/7e90cf643f633e857443e0c9e72471b221735c50.1631115443.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index c4ec3672da77b037880e140fbaac5ce6fb780d66..ead85f4d34272cadf6e2136f0162d574c5899df1 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-2197,8
+2197,9
@@
static void io_req_task_work_add(struct io_kiocb *req)
* will do the job.
*/
notify = (req->ctx->flags & IORING_SETUP_SQPOLL) ? TWA_NONE : TWA_SIGNAL;
- if (!task_work_add(tsk, &tctx->task_work, notify)) {
- wake_up_process(tsk);
+ if (likely(!task_work_add(tsk, &tctx->task_work, notify))) {
+ if (notify == TWA_NONE)
+ wake_up_process(tsk);
return;
}