Commit 6cf5862e authored by Jens Axboe's avatar Jens Axboe

io-wq: use __set_notify_signal() to wake workers

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.
Reviewed-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20220426014904.60384-4-axboe@kernel.dkSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3a4b89a2
...@@ -871,7 +871,7 @@ static bool io_wq_for_each_worker(struct io_wqe *wqe, ...@@ -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) 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); wake_up_process(worker->task);
return false; return false;
} }
...@@ -991,7 +991,7 @@ static bool __io_wq_worker_cancel(struct io_worker *worker, ...@@ -991,7 +991,7 @@ static bool __io_wq_worker_cancel(struct io_worker *worker,
{ {
if (work && match->fn(work, match->data)) { if (work && match->fn(work, match->data)) {
work->flags |= IO_WQ_WORK_CANCEL; work->flags |= IO_WQ_WORK_CANCEL;
set_notify_signal(worker->task); __set_notify_signal(worker->task);
return true; return true;
} }
......
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