diff options
author | David Rientjes <rientjes@google.com> | 2013-04-29 18:06:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:54:28 -0400 |
commit | 4b59e6c4730978679b414a8da61514a2518da512 (patch) | |
tree | 241f48acea764191a458c6ae2d058b079b24f12d /arch/parisc | |
parent | fe0bfaaff84429a35e4447d4ccd646aecf5999fb (diff) |
mm, show_mem: suppress page counts in non-blockable contexts
On large systems with a lot of memory, walking all RAM to determine page
types may take a half second or even more.
In non-blockable contexts, the page allocator will emit a page allocation
failure warning unless __GFP_NOWARN is specified. In such contexts, irqs
are typically disabled and such a lengthy delay may even result in NMI
watchdog timeouts.
To fix this, suppress the page walk in such contexts when printing the
page allocation failure warning.
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/mm/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 3ac462de53a4..cf2da13c41e6 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -697,6 +697,8 @@ void show_mem(unsigned int filter) | |||
697 | 697 | ||
698 | printk(KERN_INFO "Mem-info:\n"); | 698 | printk(KERN_INFO "Mem-info:\n"); |
699 | show_free_areas(filter); | 699 | show_free_areas(filter); |
700 | if (filter & SHOW_MEM_FILTER_PAGE_COUNT) | ||
701 | return; | ||
700 | #ifndef CONFIG_DISCONTIGMEM | 702 | #ifndef CONFIG_DISCONTIGMEM |
701 | i = max_mapnr; | 703 | i = max_mapnr; |
702 | while (i-- > 0) { | 704 | while (i-- > 0) { |