x86, nmi: new NMI handling routines
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest6 patches 6 repliesIn review
- v66 patches 12 repliesSuperseded
- v56 patches 21 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 6 patches | 13 replies | Superseded | |
| v3 | 6 patches | 17 replies | Superseded | |
| v2 | 6 patches | 1 reply | Superseded | |
| v1 RFC | 6 patches | 19 replies | Superseded |
Changes in v7 from the cover letter
- removed the b2b optimization in the nmi_handle call
- small code cleanups in patch 3/4
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86, nmi: split out nmi from traps.carch/ arch/ arch/ | +179 | 0 replies | |
| 2/6 | x86, nmi: create new NMI handler routinesarch/ arch/ | +171 | 0 replies | |
| 3/6 | x86, nmi: wire up NMI handlers to new routinesarch/ arch/ arch/ +13 more | +123 | 0 replies | |
| 4/6 | x86, nmi: add in logic to handle multiple events and unknown NMIsarch/ arch/ arch/ +1 more | +93 | 0 replies | |
| 5/6 | x86, nmi: track NMI usage statsarch/ | +18 | 0 replies | |
| 6/6 | x86, nmi: print out NMI stats in /proc/interruptsarch/ arch/ arch/ | +37 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Corey Minyard |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | A-b |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [V7][PATCH 0/6] x86, nmi: new NMI handling routines
I had the pleasure of hosting Robert Richter at Red Hat in August. 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.
I rebased this on top of tglx/perf/core [cba9bd22], I hope that is the right branch?
V7:
- removed the b2b optimization in the nmi_handle call
- small code cleanups in patch 3/4
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 | 69 +----- arch/x86/kernel/crash.c | 5 +- arch/x86/kernel/irq.c | 2 + arch/x86/kernel/kgdb.c | 60 +++- arch/x86/kernel/nmi.c | 464 +++++++++++++++++++++++++++++++ arch/x86/kernel/process_32.c | 2 + arch/x86/kernel/process_64.c | 2 + 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 +-- 21 files changed, 607 insertions(+), 433 deletions(-) create mode 100644 arch/x86/kernel/nmi.c
Signature · 1 line
1.7.6