linux/kernel/events
Peter Zijlstra 144060fee0 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>
2011-08-14 11:53:03 +02:00
..
core.c perf: Add PM notifiers to fix CPU hotplug races 2011-08-14 11:53:03 +02:00
hw_breakpoint.c perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
internal.h perf: Remove the nmi parameter from the swevent and overflow interface 2011-07-01 11:06:35 +02:00
Makefile perf: Split up buffer handling from core code 2011-06-09 12:57:54 +02:00
ring_buffer.c perf: Remove the perf_output_begin(.sample) argument 2011-07-01 11:06:35 +02:00