]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/page_alloc.c
mm, show_mem: suppress page counts in non-blockable contexts
[karo-tx-linux.git] / mm / page_alloc.c
index 7ff1536f01b88a0d3a14e54fdb5aa11cecb8fbdd..da7a2fe7332e2e62053122ad046d23927b46c925 100644 (file)
@@ -2002,6 +2002,13 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...)
            debug_guardpage_minorder() > 0)
                return;
 
+       /*
+        * Walking all memory to count page types is very expensive and should
+        * be inhibited in non-blockable contexts.
+        */
+       if (!(gfp_mask & __GFP_WAIT))
+               filter |= SHOW_MEM_FILTER_PAGE_COUNT;
+
        /*
         * This documents exceptions given to allocations in certain
         * contexts that are allowed to allocate outside current's set