Patch "Revert "workqueue: make sure delayed work run in local cpu"" has been added to the 3.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
Revert "workqueue: make sure delayed work run in local cpu"
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-workqueue-make-sure-delayed-work-run-in-local-cpu.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
041bd12e272c53a35c54c13875839bcb98c999ceMon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Tue, 9 Feb 2016 16:11:26 -0500
Subject: Revert "workqueue: make sure delayed work run in local cpu"
From: Tejun Heo <[email protected]>
commit 041bd12e272c53a35c54c13875839bcb98c999ce upstream.
This reverts commit 874bbfe600a660cba9c776b3957b1ce393151b76.
Workqueue used to implicity guarantee that work items queued without explicit CPU specified are put on the local CPU. Recent changes in timer broke the guarantee and led to vmstat breakage which was fixed by 176bed1de5bf ("vmstat: explicitly schedule per-cpu work on the CPU we need it to run on").
vmstat is the most likely to expose the issue and it's quite possible that there are other similar problems which are a lot more difficult to trigger. As a preventive measure, 874bbfe600a6 ("workqueue: make sure delayed work run in local cpu") was applied to restore the local CPU guarnatee. Unfortunately, the change exposed a bug in timer code which got fixed by 22b886dd1018 ("timers: Use proper base migration in add_timer_on()"). Due to code restructuring, the commit couldn't be backported beyond certain point and stable kernels which only had 874bbfe600a6 started crashing.
The local CPU guarantee was accidental more than anything else and we want to get rid of it anyway. As, with the vmstat case fixed, 874bbfe600a6 is causing more problems than it's fixing, it has been decided to take the chance and officially break the guarantee by reverting the commit. A debug feature will be added to force foreign CPU assignment to expose cases relying on the guarantee and fixes for the individual cases will be backported to stable as necessary.
--- kernel/workqueue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/workqueue.c +4 -4
@@ -1475,13 +1475,13 @@ static void __queue_delayed_work(int cputimer_stats_timer_set_start_info (&dwork->timer); dwork->wq = wq; -/* timer isn't guaranteed to run in this cpu, record earlier */ -if (cpu ==WORK_CPU_UNBOUND ) - cpu =raw_smp_processor_id (); dwork->cpu = cpu; timer->expires = jiffies + delay; -add_timer_on (timer, cpu); +if (unlikely (cpu !=WORK_CPU_UNBOUND )) +add_timer_on (timer, cpu); +else +add_timer (timer); }/**
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/sata_sil-disable-trim.patch queue-3.14/libata-fix-sff-host-state-machine-locking-while-polling.patch queue-3.14/devres-fix-a-for-loop-bounds-check.patch queue-3.14/revert-workqueue-make-sure-delayed-work-run-in-local-cpu.patch