Commit 27eb0b28 authored by Prarit Bhargava's avatar Prarit Bhargava Committed by Thomas Gleixner

x86: stop nmi softlockup warnings in show_mem()

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: default avatarPrarit Bhargava <prarit@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 509a80c4
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/nmi.h>
#include <linux/swap.h> #include <linux/swap.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/highmem.h> #include <linux/highmem.h>
...@@ -39,6 +40,8 @@ void show_mem(void) ...@@ -39,6 +40,8 @@ void show_mem(void)
for_each_online_pgdat(pgdat) { for_each_online_pgdat(pgdat) {
pgdat_resize_lock(pgdat, &flags); pgdat_resize_lock(pgdat, &flags);
for (i = 0; i < pgdat->node_spanned_pages; ++i) { for (i = 0; i < pgdat->node_spanned_pages; ++i) {
if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
touch_nmi_watchdog();
page = pgdat_page_nr(pgdat, i); page = pgdat_page_nr(pgdat, i);
total++; total++;
if (PageHighMem(page)) if (PageHighMem(page))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment