public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <brauner@kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org
Subject: io_wq_worker_wake() calls ttwu() twice if TIF_NOTIFY_SIGNAL is not set
Date: Sun, 27 Sep 2026 11:56:46 +0200	[thread overview]
Message-ID: <arjoXp6ovCAXxb8l@redhat.com> (raw)

I can't understand what this trivial helper is trying to do.

Does it really need to set TIF_NOTIFY_SIGNAL and do the unconditonal
wakeup including TASK_UNINTERRUPTIBLE? In this case in can just do

	static bool io_wq_worker_wake(struct io_worker *worker, void *data)
	{
		set_tsk_thread_flag(worker->task, TIF_NOTIFY_SIGNAL);
		wake_up_process(worker->task);
		return false;
	}

Or may be it can rely on __set_notify_signal() which does
wake_up_state(TASK_INTERRUPTIBLE) if TIF_NOTIFY_SIGNAL is not set?
Then wake_up_process() should be removed.

Confused ;)

Oleg.


                 reply	other threads:[~2026-09-27  9:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=arjoXp6ovCAXxb8l@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 \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox