All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/6] x86, nmi: new NMI handling routines
@ 2011-08-19 20:37 Don Zickus
  2011-08-19 20:37 ` [RFC][PATCH 1/6] x86, nmi: split out nmi from traps.c Don Zickus
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Don Zickus @ 2011-08-19 20:37 UTC (permalink / raw)
  To: x86, Andi Kleen, Robert Richter, Peter Zijlstra, ying.huang
  Cc: LKML, jason.wessel, Don Zickus

I had the pleasure of hosting Robert Richter this week at Red Hat.  One of
the issues he wanted to talk with me about was having the NMI handling 
routines execute all the NMI handlers for each NMI mainly for his AMD IBS
work.  But he also brought up another good point that because of the way NMIs
work, it is possible to lose them if multiple NMIs happen at the same time.

As a result, we sat around and discussed how we could go about executing
all the nmi handlers for each NMI to ensure that we would not lose any events.

We decided the best way to do this would be to have the NMI handlers break
away from the notifier routines and create our own.  This would allow us to
execute all the handlers without hacking up the notifier stuff and easily
track the number of events processed at a higher level to deal with the new
problemm of extra NMIs.

I spent some time hacking and came up with this patch.  I tested it on my
core2quad machine trying to enable all the NMI handler I could, mainly
perf and kgdb (and oprofile too when perf was disabled).  Everything seems
to work correctly.  If people are ok with this approach, I'll try and test
this on more machines.

More details about the patch are in the individual changelogs.

Don Zickus (6):
  x86, nmi: split out nmi from traps.c
  x86, nmi: create new NMI handler routines
  x86, nmi: wire up NMI handlers to new routines
  x86, nmi:  add in logic to handle multiple events and unknown NMIs
  x86, nmi: track NMI usage stats
  x86, nmi: print out NMI stats in /proc/interrupts

 arch/x86/include/asm/nmi.h              |   39 ++--
 arch/x86/include/asm/reboot.h           |    2 +-
 arch/x86/kernel/Makefile                |    2 +-
 arch/x86/kernel/apic/hw_nmi.c           |   27 +--
 arch/x86/kernel/apic/x2apic_uv_x.c      |   20 +--
 arch/x86/kernel/cpu/mcheck/mce-inject.c |   20 +-
 arch/x86/kernel/cpu/mcheck/mce.c        |    3 -
 arch/x86/kernel/cpu/perf_event.c        |   60 +----
 arch/x86/kernel/crash.c                 |    5 +-
 arch/x86/kernel/irq.c                   |    2 +
 arch/x86/kernel/kgdb.c                  |   60 ++++--
 arch/x86/kernel/nmi.c                   |  412 +++++++++++++++++++++++++++++++
 arch/x86/kernel/reboot.c                |   23 +--
 arch/x86/kernel/traps.c                 |  155 ------------
 arch/x86/oprofile/nmi_int.c             |   40 +--
 arch/x86/oprofile/nmi_timer_int.c       |   28 +--
 drivers/acpi/apei/ghes.c                |   22 +-
 drivers/char/ipmi/ipmi_watchdog.c       |   32 +--
 drivers/watchdog/hpwdt.c                |   23 +--
 19 files changed, 552 insertions(+), 423 deletions(-)
 create mode 100644 arch/x86/kernel/nmi.c

-- 
1.7.6


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-08-24 19:17 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 20:37 [RFC][PATCH 0/6] x86, nmi: new NMI handling routines Don Zickus
2011-08-19 20:37 ` [RFC][PATCH 1/6] x86, nmi: split out nmi from traps.c Don Zickus
2011-08-19 20:37 ` [RFC][PATCH 2/6] x86, nmi: create new NMI handler routines Don Zickus
2011-08-22 14:13   ` Peter Zijlstra
2011-08-22 15:21     ` Don Zickus
2011-08-22 15:26       ` Peter Zijlstra
2011-08-22 15:41         ` Don Zickus
2011-08-22 15:31       ` Peter Zijlstra
2011-08-22 14:16   ` Peter Zijlstra
2011-08-22 15:23     ` Don Zickus
2011-08-23 14:14     ` Don Zickus
2011-08-23 14:17       ` Peter Zijlstra
2011-08-24 17:04   ` Paul E. McKenney
2011-08-24 17:44     ` Don Zickus
2011-08-24 17:51       ` Peter Zijlstra
2011-08-24 18:16         ` Don Zickus
2011-08-24 18:19           ` Peter Zijlstra
2011-08-24 19:16             ` Paul E. McKenney
2011-08-19 20:37 ` [RFC][PATCH 3/6] x86, nmi: wire up NMI handlers to new routines Don Zickus
2011-08-19 20:37 ` [RFC][PATCH 4/6] x86, nmi: add in logic to handle multiple events and unknown NMIs Don Zickus
2011-08-22 14:22   ` Peter Zijlstra
2011-08-22 15:25     ` Don Zickus
2011-08-19 20:37 ` [RFC][PATCH 5/6] x86, nmi: track NMI usage stats Don Zickus
2011-08-19 20:37 ` [RFC][PATCH 6/6] x86, nmi: print out NMI stats in /proc/interrupts Don Zickus
2011-08-22 14:27   ` Peter Zijlstra
2011-08-22 15:28     ` Don Zickus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.