nmi VS cpu hotplug
PATCH 1/1 nmi VS cpu hotplug
Hi,
With CPU hotplug enabled, NMI watchdog stoped working. It appears the violation is the cpu_online check in nmi handler. local ACPI based NMI watchdog is initialized before we set CPU online for APs. It's quite possible a NMI is fired before we set CPU online, and that's what happens here.
Zwane, I suppose you saw nmi interrupts on offline CPU, so you added this one. Several days ago I sent a patch titled 'disable LAPIC completely for offline CPU', which I guess will make it disappear. Can you try it?
So the solution is either to initialize nmi later or to delete the cpu_online check. I just take what x86_64 does.
---
linux-2.6.14-root/arch/i386/kernel/traps.c | 7 ------- 1 files changed, 7 deletions(-)
arch/i386/kernel/traps.c renamed from arch/i386/kernel/traps.c~nmi-cpuhotplug +0 -7
@@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * re cpu =smp_processor_id (); -#ifdef CONFIG_HOTPLUG_CPU -if (!cpu_online (cpu)) { -nmi_exit (); -return ; - } -#endif - ++nmi_count (cpu);if (!rcu_dereference (nmi_callback)(regs, cpu))
_
Quoted 14 lines · Shaohua Li
Hi,
With CPU hotplug enabled, NMI watchdog stoped working. It appears the violation is thecpu_onlinecheck in nmi handler. local ACPI based NMI watchdog is initialized before we set CPU online for APs. It's quite possible a NMI is fired before we set CPU online, and that's what happens here.
Zwane, I suppose you saw nmi interrupts on offline CPU, so you added this one. Several days ago I sent a patch titled 'disable LAPIC completely for offline CPU', which I guess will make it disappear. Can you try it?
So the solution is either to initialize nmi later or to delete thecpu_onlinecheck. I just take whatx86_64does.
Quoted 1 line
Signed-off-by Shaohua Li <[email protected]>
Quoted 9 lines
---
linux-2.6.14-root/arch/i386/kernel/traps.c | 7 ------- 1 files changed, 7 deletions(-)diff -puN
arch/i386/kernel/traps.c~nmi-cpuhotplugarch/i386/kernel/traps.c
arch/i386/kernel/traps.c fastcall void do_nmi(struct pt_regs * re · line 658
Quoted 9 lines
arch/i386/kernel/traps.c renamed from arch/i386/kernel/traps.c~nmi-cpuhotplug +0
-6@@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * re cpu =smp_processor_id (); -#ifdef CONFIG_HOTPLUG_CPU -if (!cpu_online (cpu)) { -nmi_exit (); -return ; - } -#endif
Nice catch, well that's really old debug code for the 'toy' i386 hotplug code i'm fine with deleting it.
Thanks,
Zwane