diff options
| author | Milosz Tanski <milosz@adfin.com> | 2013-09-06 16:41:20 +0000 |
|---|---|---|
| committer | Milosz Tanski <milosz@adfin.com> | 2013-09-06 16:41:20 +0000 |
| commit | cd0a2df681ec2af45f50c555c2a39dc92a4dff71 (patch) | |
| tree | 35d2278a9494582025f3dac08feb2266adef6a4d /kernel/workqueue.c | |
| parent | c35455791c1131e7ccbf56ea6fbdd562401c2ce2 (diff) | |
| parent | 5a6f282a2052bb13171b53f03b34501cf72c33f1 (diff) | |
Merge tag 'fscache-fixes-for-ceph' into wip-fscache
Patches for Ceph FS-Cache support
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7f5d4be22034..e93f7b9067d8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2201,6 +2201,15 @@ __acquires(&pool->lock) dump_stack(); } + /* + * The following prevents a kworker from hogging CPU on !PREEMPT + * kernels, where a requeueing work item waiting for something to + * happen could deadlock with stop_machine as such work item could + * indefinitely requeue itself while all other CPUs are trapped in + * stop_machine. + */ + cond_resched(); + spin_lock_irq(&pool->lock); /* clear cpu intensive status */ |
