Commit fd1c4bc6 authored by Hillf Danton's avatar Hillf Danton Committed by Jens Axboe
Browse files

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: default avatarHillf Danton <hdanton@sina.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1f424e8b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -429,6 +429,8 @@ next:
		if (signal_pending(current))
			flush_signals(current);

		cond_resched();

		spin_lock_irq(&worker->lock);
		worker->cur_work = work;
		spin_unlock_irq(&worker->lock);