aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2013-04-29 18:06:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:28 -0400
commit4b59e6c4730978679b414a8da61514a2518da512 (patch)
tree241f48acea764191a458c6ae2d058b079b24f12d /include/linux/mm.h
parentfe0bfaaff84429a35e4447d4ccd646aecf5999fb (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 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e2091b88d24c..f3c7b1f9d1d8 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -899,7 +899,8 @@ extern void pagefault_out_of_memory(void);
899 * Flags passed to show_mem() and show_free_areas() to suppress output in 899 * Flags passed to show_mem() and show_free_areas() to suppress output in
900 * various contexts. 900 * various contexts.
901 */ 901 */
902#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ 902#define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */
903#define SHOW_MEM_FILTER_PAGE_COUNT (0x0002u) /* page type count */
903 904
904extern void show_free_areas(unsigned int flags); 905extern void show_free_areas(unsigned int flags);
905extern bool skip_free_areas_node(unsigned int flags, int nid); 906extern bool skip_free_areas_node(unsigned int flags, int nid);