projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f424e8
)
io-wq: add cond_resched() to worker thread
author
Hillf Danton
<hdanton@sina.com>
Tue, 24 Dec 2019 16:14:29 +0000
(09:14 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 24 Dec 2019 16:14:29 +0000
(09:14 -0700)
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
patch
|
blob
|
history
diff --git
a/fs/io-wq.c
b/fs/io-wq.c
index a1c85458f021ab94da9681632fac20f37b4ec529..541c8a3e0bbb5154468dd84164fbb0319d8e8b91 100644
(file)
--- a/
fs/io-wq.c
+++ b/
fs/io-wq.c
@@
-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);