x86: Warn when NMI handlers take large amounts of time
x86: Warn when NMI handlers take large amounts of time

I have a system which is causing all kinds of problems.  It has
8 NUMA nodes, and lots of cores that can fight over cachelines.
If things are not working _perfectly_, then NMIs can take longer
than expected.

If we get too many of them backed up to each other, we can
easily end up in a situation where we are doing nothing *but*
running NMIs.  The biggest problem, though, is that this happens
_silently_.  You might be lucky to get an hrtimer warning, but
most of the time system simply hangs.

This patch should at least give us some warning before we fall
off the cliff.  the warnings look like this:

	nmi_handle: perf_event_nmi_handler() took: 26095071 ns

The message is triggered whenever we notice the longest NMI
we've seen to date.  You can always view and reset this value
via the debugfs interface if you like.

Signed-off-by: Dave Hansen <71bcd3d88361b22cd828f9a350d19d8775f56d4e@linux.intel.com>
Acked-by: Peter Zijlstra <645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl>
Cc: 19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org
Cc: 293abb6b76d7791c0732cc517d38c4b5c734b87f@ghostprotocols.net
Cc: Dave Hansen <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@sr71.net>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs