From: Oleg Nesterov <oleg@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christian Brauner <brauner@kernel.org>,
Pavel Begunkov <asml.silence@gmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] io_uring/io-wq: don't call try_to_wake_up() twice in io_wq_worker_wake()
Date: Sun, 11 Oct 2026 17:13:16 +0200 [thread overview]
Message-ID: <asunjCm5Ovj_YDSp@redhat.com> (raw)
io_wq_worker_wake() does an unconditional wake_up_process(). This means
that __set_notify_signal() makes no real sense. Change it to use
set_tsk_thread_flag(TIF_NOTIFY_SIGNAL) instead to avoid test_and_set_bit()
and another wake_up_state(TASK_INTERRUPTIBLE) if NOTIFY_SIGNAL was not set.
Perhaps io_wq_worker_wake() can rely on __set_notify_signal() solely, but I
don't understand this code enough and this patch doesn't change the current
behaviour.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
io_uring/io-wq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index 2ca223e47d41..eb90961f32d8 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -972,7 +972,7 @@ static void io_wq_for_each_worker(struct io_wq *wq,
static bool io_wq_worker_wake(struct io_worker *worker, void *data)
{
- __set_notify_signal(worker->task);
+ set_tsk_thread_flag(worker->task, TIF_NOTIFY_SIGNAL);
wake_up_process(worker->task);
return false;
}
--
2.55.0
next reply other threads:[~2026-10-11 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 15:13 Oleg Nesterov [this message]
2026-10-12 8:38 ` [PATCH] io_uring/io-wq: don't call try_to_wake_up() twice in io_wq_worker_wake() Christian Brauner
2026-10-12 18:51 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=asunjCm5Ovj_YDSp@redhat.com \
--to=oleg@redhat.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.