Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
Subsystems (6)
Suren Baghdasaryan
maintainerPATCH v2 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).
---
Based on mm-new
Changes since v1 [1]:
- Fixed a typo, per Matthew Wilcox
- Added Acked-by, per SeongJae Park
[1] https://lore.kernel.org/all/[email protected]/
Documentation/admin-guide/sysctl/vm.rst | 4 ++++ Documentation/mm/allocation-profiling.rst | 10 ++++++++++ 2 files changed, 14 insertions(+)
Documentation/admin-guide/sysctl/vm.rst +4 -0
@@ -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 produced by allocations made while profiling is disabled and freed +when it's enabled. + memory_failure_early_kill =========================
Documentation/mm/allocation-profiling.rst +10 -0
@@ -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 produced by allocations made while profiling is disabled and freed + when it's enabled. + Runtime info: /proc/allocinfo
base-commit: eeb33083cc4749bdb61582eaeb5c200702607703
Signature · 1 line
2.52.0.457.g6b5491de43-goog
Andrew Morton
maintainerQuoted 5 lines · On Fri, 16 Jan 2026 10:44:23 -0800 Suren Baghdasaryan <[email protected]> wrote:
When
CONFIG_MEM_ALLOC_PROFILING_DEBUG=y,/proc/sys/vm/mem_profilingis 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).
Cool, thanks.
Quoted 1 line
Documentation/process/stable-kernel-rules.rst tells me that -stable tree users prefer incorrect documentation ;)