OSDN Git Service

io-wq: add cond_resched() to worker thread
authorHillf Danton <hdanton@sina.com>
Tue, 24 Dec 2019 16:14:29 +0000 (09:14 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Dec 2019 16:14:29 +0000 (09:14 -0700)
commitfd1c4bc6e9b34a5e4fe7a3130a49380ef9d7037c
treee0a9844d755b7ca81bee15fa3b15ea74208ce7f1
parent1f424e8bd18754d27b15f49359004b0cea344fb5
io-wq: add cond_resched() to worker thread

Reschedule the current IO worker to cut the risk that it is becoming
a cpu hog.

Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c