RFC nmi watchdog: x86 32/64 cleanup
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | nmi watchdog header cleanuparch/ arch/ arch/ +10 more | +53 | 0 replies | |
| 2/8 | Add performance counter reservation framework for UP kernelsarch/ arch/ include/ +1 more | +308 | 0 replies | |
| 3/8 | Utilize performance counter reservation framework in oprofilearch/ arch/ arch/ +2 more | +199 | 0 replies | |
| 4/8 | Add SMP support on x86_64 to reservation frameworkarch/ arch/ include/ | +290 | 1 reply | |
| 5/8 | Add SMP support on i386 to reservation frameworkarch/ arch/ arch/ +2 more | +361 | 2 replies | |
| 6/8 | Cleanup NMI interrupt patharch/ arch/ arch/ +3 more | +57 | 0 replies | |
| 7/8 | Remove un/set_nmi_callback and reserve/release_lapic_nmi functionsarch/ arch/ arch/ +6 more | +80 | 0 replies | |
| 8/8 | Add abilty to enable/disable nmi watchdog from sysfsarch/ arch/ include/ +3 more | +110 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/8] [RFC PATCH] nmi watchdog: x86 32/64 cleanup
A major cleanup of the nmi watchdog on the i386 and x86_64 archs.
This little project started out as a way to get unknown_nmi_panic working on an x86_64 SMP machine. But after Andi rejected my dirty little hack ;), it grew into a spring cleaning of the nmi watchdog.
The fix Andi wanted led to a conflict with how oprofile worked. This led to a reservation layer around the performance counters and a bunch of changes in oprofile startup. All the reservation layer consists of is reserving a bit that corresponds to a performance counter. The intent here is to prevent subsystems like oprofile and nmi watchdog from stomping on each other when trying to manipulate these counters. Currently, oprofile must stop the nmi watchdog before using the counters. This approach does not encourage any sharing. :)
During the testing of this reservation layer, I ran into more and more bugs from old hacks (notably in the SMP cases). As a result I found myself rewriting a lot of this code. I think I straightened everything out, except for enabling/disabling the nmi watchdog on an ioapic. The enable_irq/disable_irq macros don't seem to work for me and I don't know enough about the subsystem to figure it out either.
Of course the oprofile code is shared with the i386 arch, so all the changes I did in x86_64 had to be duplicated over there too.
I tested these changes on a Xeon (UP/SMP), P4 (32/64, UP/SMP) and under various boot-up defaults (nmi-watchdog=0,1,2). I also worked on some of these changes with Andi Kleen and the oprofile folks, so these ideas shouldn't be too surprising, just perhaps the implementation. :o
Any thoughts/feedback/criticism to clean this up more and probably fix some of my coding style would be appreciated.
Cheers,
Don
--