io_uring/io-wq: don't gate worker wake up success on wake_up_process() io_uring-wq-lock
authorJens Axboe <axboe@kernel.dk>
Wed, 9 Aug 2023 19:07:54 +0000 (13:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Aug 2023 19:34:43 +0000 (13:34 -0600)
commitb3019e2fad59ea3908efe203ed580b0d2c74e09b
treea0273840b1303b95b86bcd5940aea43ba3d36100
parent47f9ee73a406b194678b3cd604553e1ef7f66a3f
io_uring/io-wq: don't gate worker wake up success on wake_up_process()

All we really care about is finding a free worker. If said worker is
already running, it's either starting new work already or it's just
finishing up existing work. For the latter, we'll be finding this work
item next anyway, and for the former, if the worker does go to sleep,
it'll create a new worker anyway as we have pending items.

This reduces try_to_wake_up() overhead considerably:

23.16%    -10.46%  [kernel.kallsyms]      [k] try_to_wake_up

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io-wq.c