[IA64] Stop bogus NMI & softlockup warnings in ia64 show_mem
authorPrarit Bhargava <prarit@redhat.com>
Wed, 22 Aug 2007 18:34:38 +0000 (14:34 -0400)
committerTony Luck <tony.luck@intel.com>
Sat, 1 Sep 2007 09:50:21 +0000 (02:50 -0700)
When dumping memory via sysrq-m it is possible to take a bogus NMI watchdog
or softlockup watchdog because the dump can take a long time on big memory
systems.

Occasionally tickle the watchdog when doing the dump.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c

index 7ac8592a35b6fd0a8550de87fedec681496a9d7b..d3c538be466c8e82d5e76719230de21fa3121d79 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/bootmem.h>
 #include <linux/efi.h>
 #include <linux/mm.h>
+#include <linux/nmi.h>
 #include <linux/swap.h>
 
 #include <asm/meminit.h>
@@ -56,6 +57,8 @@ void show_mem(void)
                present = pgdat->node_present_pages;
                for(i = 0; i < pgdat->node_spanned_pages; i++) {
                        struct page *page;
+                       if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
+                               touch_nmi_watchdog();
                        if (pfn_valid(pgdat->node_start_pfn + i))
                                page = pfn_to_page(pgdat->node_start_pfn + i);
                        else {
index 0dbf0e81f8c00a4a42442f8b58a1a2c4fb35dda6..0d34585058c8d0044eb97af1370543e34afb2167 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/nmi.h>
 #include <linux/swap.h>
 #include <linux/bootmem.h>
 #include <linux/acpi.h>
@@ -533,6 +534,8 @@ void show_mem(void)
                present = pgdat->node_present_pages;
                for(i = 0; i < pgdat->node_spanned_pages; i++) {
                        struct page *page;
+                       if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
+                               touch_nmi_watchdog();
                        if (pfn_valid(pgdat->node_start_pfn + i))
                                page = pfn_to_page(pgdat->node_start_pfn + i);
                        else {