io-wq: don't resched if there is no work
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 13 Mar 2020 21:31:03 +0000 (00:31 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 14 Mar 2020 23:02:26 +0000 (17:02 -0600)
commitd78298e73a3443a3c1766fa89f5370f52a4efd94
tree6b2d9b5433a7fa4fd26470cce37892b01337153b
parent2293b4195800f88de2c454a24b25874be56d87f3
io-wq: don't resched if there is no work

This little tweak restores the behaviour that was before the recent
io_worker_handle_work() optimisation patches. It makes the function do
cond_resched() and flush_signals() only if there is an actual work to
execute.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c