mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
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>
This commit is contained in:
parent
1f424e8bd1
commit
fd1c4bc6e9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user