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>
This commit is contained in:

committad av
Linus Torvalds

förälder
fe0bfaaff8
incheckning
4b59e6c473
@@ -47,6 +47,8 @@ void show_mem(unsigned int filter)
|
||||
printk(KERN_INFO "Mem-info:\n");
|
||||
show_free_areas(filter);
|
||||
printk(KERN_INFO "Node memory in pages:\n");
|
||||
if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
|
||||
return;
|
||||
for_each_online_pgdat(pgdat) {
|
||||
unsigned long present;
|
||||
unsigned long flags;
|
||||
|
@@ -623,6 +623,8 @@ void show_mem(unsigned int filter)
|
||||
|
||||
printk(KERN_INFO "Mem-info:\n");
|
||||
show_free_areas(filter);
|
||||
if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
|
||||
return;
|
||||
printk(KERN_INFO "Node memory in pages:\n");
|
||||
for_each_online_pgdat(pgdat) {
|
||||
unsigned long present;
|
||||
|
Referens i nytt ärende
Block a user