[Devel] [PATCH RHEL7 COMMIT] ms/mm, page_alloc: drop should_suppress_show_mem

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jun 16 17:57:54 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.10.1.vz7.162.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.10.1.vz7.162.4
------>
commit efa5c397b9d746657d56d1c9f8b48e12f66f88bf
Author: Michal Hocko <mhocko at suse.com>
Date:   Tue Jun 16 17:57:54 2020 +0300

    ms/mm, page_alloc: drop should_suppress_show_mem
    
    should_suppress_show_mem() was introduced to reduce the overhead of
    show_mem on large NUMA systems.  Things have changed since then though.
    Namely c78e93630d15 ("mm: do not walk all of system memory during
    show_mem") has reduced the overhead considerably.
    
    Moreover warn_alloc_show_mem clears SHOW_MEM_FILTER_NODES when called from
    the IRQ context already so we are not printing per node stats.
    
    Remove should_suppress_show_mem because we are losing potentially
    interesting information about allocation failures.  We have seen a bug
    report where system gets unresponsive under memory pressure and there is
    only
    
    kernel: [2032243.696888] qlge 0000:8b:00.1 ql1: Could not get a page chunk, i=8, clean_idx =200 .
    kernel: [2032243.710725] swapper/7: page allocation failure: order:1, mode:0x1084120(GFP_ATOMIC|__GFP_COLD|__GFP_COMP)
    
    without an additional information for debugging.  It would be great to see
    the state of the page allocator at the moment.
    
    Link: http://lkml.kernel.org/r/20180907114334.7088-1-mhocko@kernel.org
    Signed-off-by: Michal Hocko <mhocko at suse.com>
    Acked-by: Vlastimil Babka <vbabka at suse.cz>
    Cc: David Rientjes <rientjes at google.com>
    Cc: Mel Gorman <mgorman at techsingularity.net>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    
    (cherry picked from commit 2c029a1ea3aac296cd5b47584a579defcc4b4aa0)
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 mm/page_alloc.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e6ee98b288081..8fe9b18fef7de 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2788,20 +2788,6 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
 	return page;
 }
 
-/*
- * Large machines with many possible nodes should not always dump per-node
- * meminfo in irq context.
- */
-static inline bool should_suppress_show_mem(void)
-{
-	bool ret = false;
-
-#if NODES_SHIFT > 8
-	ret = in_interrupt();
-#endif
-	return ret;
-}
-
 static DEFINE_RATELIMIT_STATE(nopage_rs,
 		DEFAULT_RATELIMIT_INTERVAL,
 		DEFAULT_RATELIMIT_BURST);
@@ -2851,8 +2837,7 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...)
 		current->comm, order, gfp_mask);
 
 	dump_stack();
-	if (!should_suppress_show_mem())
-		show_mem(filter);
+	show_mem(filter);
 }
 
 static inline int


More information about the Devel mailing list