Skip to content

Commit

Permalink
[PATCH] x86-64: Inhibit machine from asserting an NMI when doing Alt-…
Browse files Browse the repository at this point in the history
…SysRq-M operation.

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.

Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Konrad Rzeszutek authored and Andi Kleen committed May 2, 2007
1 parent c8118c6 commit ae32b12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/x86_64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#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>
Expand Down Expand Up @@ -73,6 +74,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))
Expand Down

0 comments on commit ae32b12

Please sign in to comment.