perf: Stop all counters on reboot
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 8 Dec 2010 14:29:02 +0000 (15:29 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 8 Dec 2010 19:16:31 +0000 (20:16 +0100)
commitc277443cfc29b1623b4923219ff0bdb48b91b589
tree0655516f81164a42dfb06e416b54c50cac33f433
parentc079c791c5a0627fc7b752d31d72e274e0596ba8
perf: Stop all counters on reboot

Use the reboot notifier to detach all running counters on reboot, this
solves a problem with kexec where the new kernel doesn't expect
running counters (rightly so).

It will however decrease the coverage of the NMI watchdog. Making a
kexec specific reboot notifier callback would be best, however that
would require touching all notifier callback handlers as they are not
properly structured to deal with new state.

As a compromise, place the perf reboot notifier at the very last
position in the list.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Don Zickus <dzickus@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c