public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Inhibit machine from asserting an NMI when doing Alt-SysRq-M operation.
@ 2007-03-27 13:45 Konrad Rzeszutek
  2007-03-28 18:56 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Konrad Rzeszutek @ 2007-03-27 13:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: konradr, konradr

This patch touches the NMI watchdog every MAX_ORDER_NR_PAGES
to inhibit the machine from triggering an NMI while the CPUs
are locked. This situation is happening on boxes with more 
than 64CPUs and 128GB of RAM when Alt-SysRq-m is performed.

It has been succesfully tested for regression on uni, 2, 4, 8 
32, and 64 CPU boxes with various memory configuration.

diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index ec31534..fd7f8a6 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -26,6 +26,7 @@ #include <linux/poison.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/memory_hotplug.h>
+#include <linux/nmi.h>
 
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -72,6 +73,11 @@ void show_mem(void)
 
 	for_each_online_pgdat(pgdat) {
                for (i = 0; i < pgdat->node_spanned_pages; ++i) {
+			/* this loop can take a while with 256 GB and 4k pages
+			   so update the NMI watchdog */
+			if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) {
+				touch_nmi_watchdog();
+			}
 			page = pfn_to_page(pgdat->node_start_pfn + i);
 			total++;
 			if (PageReserved(page))

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

end of thread, other threads:[~2007-03-28 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 13:45 [PATCH] Inhibit machine from asserting an NMI when doing Alt-SysRq-M operation Konrad Rzeszutek
2007-03-28 18:56 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox