[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <308e0293e68dfadb2ca3ee5b4c650fc3d09d7a35.1756318426.git.pyyjason@gmail.com>
Date: Wed, 27 Aug 2025 11:34:22 -0700
From: Yueyang Pan <pyyjason@...il.com>
To: Suren Baghdasaryan <surenb@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>,
Brendan Jackman <jackmanb@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Zi Yan <ziy@...dia.com>,
Usama Arif <usamaarif642@...il.com>
Cc: linux-mm@...ck.org,
kernel-team@...a.com,
linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/2] mm/show_mem: No print when not mem_alloc_profiling_enabled()
This patch makes print kernel memory allocation information
controlled by mem_alloc_profiling_enabled() so that we won't
see all zero numbers in production.
Signed-off-by: Yueyang Pan <pyyjason@...il.com>
---
mm/show_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/show_mem.c b/mm/show_mem.c
index 41999e94a56d..b71e222fde86 100644
--- a/mm/show_mem.c
+++ b/mm/show_mem.c
@@ -419,7 +419,7 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx)
printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages));
#endif
#ifdef CONFIG_MEM_ALLOC_PROFILING
- {
+ if (mem_alloc_profiling_enabled()) {
struct codetag_bytes tags[10];
size_t i, nr;
--
2.47.3
Powered by blists - more mailing lists