diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-08-01 12:49:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-08-14 11:53:03 +0200 |
commit | 144060fee07e9c22e179d00819c83c86fbcbf82c (patch) | |
tree | a13f3806fb266158570f1d7f7ece72f68199d7c2 /kernel/watchdog.c | |
parent | perf, x86: Avoid kfree() in CPU_STARTING (diff) | |
download | linux-144060fee07e9c22e179d00819c83c86fbcbf82c.tar.xz linux-144060fee07e9c22e179d00819c83c86fbcbf82c.zip |
perf: Add PM notifiers to fix CPU hotplug races
Francis reports that s2r gets him spurious NMIs, this is because the
suspend code leaves the boot cpu up and running.
Cure this by adding a suspend notifier. The problem is that hotplug
and suspend are completely un-serialized and the PM notifiers run
before the suspend cpu unplug of all but the boot cpu.
This leaves a window where the user can initialize another hotplug
operation (either remove or add a cpu) resulting in either one too
many or one too few hotplug ops. Thus we cannot use the hotplug code
for the suspend case.
There's another reason to not use the hotplug code, which is that the
hotplug code totally destroys the perf state, we can do better for
suspend and simply remove all counters from the PMU so that we can
re-instate them on resume.
Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-1cvevybkgmv4s6v5y37t4847@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/watchdog.c')
0 files changed, 0 insertions, 0 deletions