Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
Subsystems (6)
Suren Baghdasaryan
maintainerPATCH 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).
--- 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 produces 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 produces by allocations made while profiling is disabled and freed + when it's enabled. + Runtime info: /proc/allocinfo
base-commit: 560d6a4c4951ae76b5c6d5b5b8650276706f68ac
Signature · 1 line
2.52.0.457.g6b5491de43-goog
Quoted 1 line · Suren Baghdasaryan
+ warnings produces by allocations made while profiling is disabled and freed
"produced"
Suren Baghdasaryan
maintainerQuoted 5 lines · Matthew Wilcox
Quoted 1 line · Suren Baghdasaryan
+ warnings produces by allocations made while profiling is disabled and freed
"produced"
Thanks! I'll wait for a day and if there are no other objections, I will post a fixed version.
SeongJae Park
Acked-byQuoted 9 lines · On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <[email protected]> wrote:
Quoted 5 lines · Matthew Wilcox
Quoted 1 line · Suren Baghdasaryan
+ warnings produces by allocations made while profiling is disabled and freed
"produced"
Thanks! I'll wait for a day and if there are no other objections, I will post a fixed version.
Assuming Matthiew's good finding will be fixed,
Fwiw, the typo is also on the .../sysctl/vm.rst part. And from the finding, I was wondering if it is better to put the description only one of two documents rather than having the duplication, and further if the 'Usage:' part of allocation-profiling.rst is better to be moved to 'Documentation/admin-guide/mm/'. But I ended up thinking those are too trivial and small things.
Thanks,
SJ
Suren Baghdasaryan
maintainerQuoted 8 lines · SeongJae Park
Quoted 5 lines · On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <[email protected]> wrote:
Quoted 4 lines · Matthew Wilcox
Quoted 1 line · Suren Baghdasaryan
+ warnings produces by allocations made while profiling is disabled and freed
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
"produced"
Thanks! I'll wait for a day and if there are no other objections, I will post a fixed version.
Assuming Matthiew's good finding will be fixed,
Acked-by SeongJae Park <[email protected]>
Thanks!
Quoted 2 lines
Fwiw, the typo is also on the
.../sysctl/vm.rstpart.
Correct, I'll fix in both places.
Quoted 6 lines
And from the finding, I
was wondering if it is better to put the description only one of two documents rather than having the duplication, and further if the 'Usage:' part ofallocation-profiling.rstis better to be moved to 'Documentation/admin-guide/mm/'. But I ended up thinking those are too trivial and small things.
Yes, I didn't want to complicate reader's life by adding a reference for a couple of sentences.
Quoted 4 lines
Thanks,
SJ
Suren Baghdasaryan
maintainerQuoted 17 lines · Suren Baghdasaryan
Quoted 15 lines · SeongJae Park
Quoted 9 lines · On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <[email protected]> wrote:
Quoted 5 lines · Matthew Wilcox
Quoted 1 line · Suren Baghdasaryan
+ warnings produces by allocations made while profiling is disabled and freed
"produced"
Thanks! I'll wait for a day and if there are no other objections, I will post a fixed version.
Assuming Matthiew's good finding will be fixed,
Quoted 8 lines
Quoted 1 line
Acked-by SeongJae Park <[email protected]>Thanks!
Quoted 2 lines
Fwiw, the typo is also on the
.../sysctl/vm.rstpart.Correct, I'll fix in both places.
v2 is posted at
https://lore.kernel.org/all/[email protected]/
Quoted 15 lines
Quoted 7 lines
And from the finding, I
was wondering if it is better to put the description only one of two documents rather than having the duplication, and further if the 'Usage:' part ofallocation-profiling.rstis better to be moved to 'Documentation/admin-guide/mm/'. But I ended up thinking those are too trivial and small things.Yes, I didn't want to complicate reader's life by adding a reference for a couple of sentences.
Quoted 4 lines
Thanks,
SJ