From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 3/6] io-wq: use __set_notify_signal() to wake workers
Date: Mon, 25 Apr 2022 19:49:01 -0600 [thread overview]
Message-ID: <20220426014904.60384-4-axboe@kernel.dk> (raw)
In-Reply-To: <20220426014904.60384-1-axboe@kernel.dk>
The only difference between set_notify_signal() and __set_notify_signal()
is that the former checks if it needs to deliver an IPI to force a
reschedule. As the io-wq workers never leave the kernel, and IPI is never
needed, they simply need a wakeup.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
fs/io-wq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 32aeb2c581c5..824623bcf1a5 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -871,7 +871,7 @@ static bool io_wq_for_each_worker(struct io_wqe *wqe,
static bool io_wq_worker_wake(struct io_worker *worker, void *data)
{
- set_notify_signal(worker->task);
+ __set_notify_signal(worker->task);
wake_up_process(worker->task);
return false;
}
@@ -991,7 +991,7 @@ static bool __io_wq_worker_cancel(struct io_worker *worker,
{
if (work && match->fn(work, match->data)) {
work->flags |= IO_WQ_WORK_CANCEL;
- set_notify_signal(worker->task);
+ __set_notify_signal(worker->task);
return true;
}
--
2.35.1
next prev parent reply other threads:[~2022-04-26 1:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 1:48 [PATCHSET v4 next 0/5] Add support for non-IPI task_work Jens Axboe
2022-04-26 1:48 ` [PATCH 1/6] task_work: allow TWA_SIGNAL without a rescheduling IPI Jens Axboe
2022-04-26 14:39 ` Jens Axboe
2022-04-26 1:49 ` [PATCH 2/6] io_uring: serialize ctx->rings->sq_flags with atomic_or/and Jens Axboe
2022-04-26 15:03 ` Almog Khaikin
2022-04-26 15:32 ` Jens Axboe
2022-04-26 1:49 ` Jens Axboe [this message]
2022-04-26 1:49 ` [PATCH 4/6] io_uring: set task_work notify method at init time Jens Axboe
2022-04-26 1:49 ` [PATCH 5/6] io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_COOP_TASKRUN is used Jens Axboe
2022-04-26 1:49 ` [PATCH 6/6] io_uring: add IORING_SETUP_TASKRUN_FLAG Jens Axboe
2022-04-26 14:02 ` [PATCHSET v4 next 0/5] Add support for non-IPI task_work Pavel Begunkov
-- strict thread matches above, loose matches on Subject: below --
2022-04-25 14:21 [PATCHSET v3 " Jens Axboe
2022-04-25 14:21 ` [PATCH 3/6] io-wq: use __set_notify_signal() to wake workers 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=20220426014904.60384-4-axboe@kernel.dk \
--to=axboe@kernel.dk \
--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 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.