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/ia64 | |
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/ia64')
-rw-r--r-- | arch/ia64/mm/contig.c | 2 | ||||
-rw-r--r-- | arch/ia64/mm/discontig.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index 80dab509dfb0..67c59ebec899 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -47,6 +47,8 @@ void show_mem(unsigned int filter) | |||
47 | printk(KERN_INFO "Mem-info:\n"); | 47 | printk(KERN_INFO "Mem-info:\n"); |
48 | show_free_areas(filter); | 48 | show_free_areas(filter); |
49 | printk(KERN_INFO "Node memory in pages:\n"); | 49 | printk(KERN_INFO "Node memory in pages:\n"); |
50 | if (filter & SHOW_MEM_FILTER_PAGE_COUNT) | ||
51 | return; | ||
50 | for_each_online_pgdat(pgdat) { | 52 | for_each_online_pgdat(pgdat) { |
51 | unsigned long present; | 53 | unsigned long present; |
52 | unsigned long flags; | 54 | unsigned long flags; |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index c2e955ee79a8..a57436e5d405 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -623,6 +623,8 @@ void show_mem(unsigned int filter) | |||
623 | 623 | ||
624 | printk(KERN_INFO "Mem-info:\n"); | 624 | printk(KERN_INFO "Mem-info:\n"); |
625 | show_free_areas(filter); | 625 | show_free_areas(filter); |
626 | if (filter & SHOW_MEM_FILTER_PAGE_COUNT) | ||
627 | return; | ||
626 | printk(KERN_INFO "Node memory in pages:\n"); | 628 | printk(KERN_INFO "Node memory in pages:\n"); |
627 | for_each_online_pgdat(pgdat) { | 629 | for_each_online_pgdat(pgdat) { |
628 | unsigned long present; | 630 | unsigned long present; |