[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260115054557.2127777-1-surenb@google.com>
Date: Wed, 14 Jan 2026 21:45:57 -0800
From: Suren Baghdasaryan <surenb@...gle.com>
To: akpm@...ux-foundation.org
Cc: kent.overstreet@...ux.dev, corbet@....net, ranxiaokai627@....com,
ran.xiaokai@....com.cn, surenb@...gle.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, stable@...r.kernel.org
Subject: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl
limitations in debug mode
When CONFIG_MEM_ALLOC_PROFILING_DEBUG=y, /proc/sys/vm/mem_profiling is
read-only to avoid debug warnings in a scenario when an allocation is
made while profiling is disabled (allocation does not get an allocation
tag), then profiling gets enabled and allocation gets freed (warning due
to the allocation missing allocation tag).
Fixes: ebdf9ad4ca98 ("memprofiling: documentation")
Reported-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
Cc: stable@...r.kernel.org
---
Documentation/admin-guide/sysctl/vm.rst | 4 ++++
Documentation/mm/allocation-profiling.rst | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst
index 9096e2d77c2a..8577ea91e226 100644
--- a/Documentation/admin-guide/sysctl/vm.rst
+++ b/Documentation/admin-guide/sysctl/vm.rst
@@ -487,6 +487,10 @@ memory allocations.
The default value depends on CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT.
+When CONFIG_MEM_ALLOC_PROFILING_DEBUG=y, this control is read-only to avoid
+warnings produces by allocations made while profiling is disabled and freed
+when it's enabled.
+
memory_failure_early_kill
=========================
diff --git a/Documentation/mm/allocation-profiling.rst b/Documentation/mm/allocation-profiling.rst
index 316311240e6a..058d2faffb75 100644
--- a/Documentation/mm/allocation-profiling.rst
+++ b/Documentation/mm/allocation-profiling.rst
@@ -33,6 +33,16 @@ Boot parameter:
sysctl:
/proc/sys/vm/mem_profiling
+ 1: Enable memory profiling.
+
+ 0: Disable memory profiling.
+
+ The default value depends on CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT.
+
+ When CONFIG_MEM_ALLOC_PROFILING_DEBUG=y, this control is read-only to avoid
+ warnings produces by allocations made while profiling is disabled and freed
+ when it's enabled.
+
Runtime info:
/proc/allocinfo
base-commit: 560d6a4c4951ae76b5c6d5b5b8650276706f68ac
--
2.52.0.457.g6b5491de43-goog
Powered by blists - more mailing lists