* [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
@ 2026-01-15 5:45 Suren Baghdasaryan
2026-01-15 5:57 ` Matthew Wilcox
0 siblings, 1 reply; 6+ messages in thread
From: Suren Baghdasaryan @ 2026-01-15 5:45 UTC (permalink / raw)
To: akpm
Cc: kent.overstreet, corbet, ranxiaokai627, ran.xiaokai, surenb,
linux-doc, linux-kernel, linux-mm, stable
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@linux-foundation.org>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: stable@vger.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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
2026-01-15 5:45 [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode Suren Baghdasaryan
@ 2026-01-15 5:57 ` Matthew Wilcox
2026-01-15 17:05 ` Suren Baghdasaryan
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Wilcox @ 2026-01-15 5:57 UTC (permalink / raw)
To: Suren Baghdasaryan
Cc: akpm, kent.overstreet, corbet, ranxiaokai627, ran.xiaokai,
linux-doc, linux-kernel, linux-mm, stable
On Wed, Jan 14, 2026 at 09:45:57PM -0800, Suren Baghdasaryan wrote:
> + warnings produces by allocations made while profiling is disabled and freed
"produced"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
2026-01-15 5:57 ` Matthew Wilcox
@ 2026-01-15 17:05 ` Suren Baghdasaryan
2026-01-16 2:18 ` SeongJae Park
0 siblings, 1 reply; 6+ messages in thread
From: Suren Baghdasaryan @ 2026-01-15 17:05 UTC (permalink / raw)
To: Matthew Wilcox
Cc: akpm, kent.overstreet, corbet, ranxiaokai627, ran.xiaokai,
linux-doc, linux-kernel, linux-mm, stable
On Wed, Jan 14, 2026 at 9:57 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Wed, Jan 14, 2026 at 09:45:57PM -0800, Suren Baghdasaryan wrote:
> > + 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
2026-01-15 17:05 ` Suren Baghdasaryan
@ 2026-01-16 2:18 ` SeongJae Park
2026-01-16 18:30 ` Suren Baghdasaryan
0 siblings, 1 reply; 6+ messages in thread
From: SeongJae Park @ 2026-01-16 2:18 UTC (permalink / raw)
To: Suren Baghdasaryan
Cc: SeongJae Park, Matthew Wilcox, akpm, kent.overstreet, corbet,
ranxiaokai627, ran.xiaokai, linux-doc, linux-kernel, linux-mm,
stable
On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <surenb@google.com> wrote:
> On Wed, Jan 14, 2026 at 9:57 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Wed, Jan 14, 2026 at 09:45:57PM -0800, Suren Baghdasaryan wrote:
> > > + 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,
Acked-by: SeongJae Park <sj@kernel.org>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
2026-01-16 2:18 ` SeongJae Park
@ 2026-01-16 18:30 ` Suren Baghdasaryan
2026-01-16 18:45 ` Suren Baghdasaryan
0 siblings, 1 reply; 6+ messages in thread
From: Suren Baghdasaryan @ 2026-01-16 18:30 UTC (permalink / raw)
To: SeongJae Park
Cc: Matthew Wilcox, akpm, kent.overstreet, corbet, ranxiaokai627,
ran.xiaokai, linux-doc, linux-kernel, linux-mm, stable
On Thu, Jan 15, 2026 at 6:18 PM SeongJae Park <sj@kernel.org> wrote:
>
> On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <surenb@google.com> wrote:
>
> > On Wed, Jan 14, 2026 at 9:57 PM Matthew Wilcox <willy@infradead.org> wrote:
> > >
> > > On Wed, Jan 14, 2026 at 09:45:57PM -0800, Suren Baghdasaryan wrote:
> > > > + 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,
>
> Acked-by: SeongJae Park <sj@kernel.org>
Thanks!
>
> Fwiw, the typo is also on the .../sysctl/vm.rst part.
Correct, I'll fix in both places.
> 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.
Yes, I didn't want to complicate reader's life by adding a reference
for a couple of sentences.
>
>
> Thanks,
> SJ
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode
2026-01-16 18:30 ` Suren Baghdasaryan
@ 2026-01-16 18:45 ` Suren Baghdasaryan
0 siblings, 0 replies; 6+ messages in thread
From: Suren Baghdasaryan @ 2026-01-16 18:45 UTC (permalink / raw)
To: SeongJae Park
Cc: Matthew Wilcox, akpm, kent.overstreet, corbet, ranxiaokai627,
ran.xiaokai, linux-doc, linux-kernel, linux-mm, stable
On Fri, Jan 16, 2026 at 10:30 AM Suren Baghdasaryan <surenb@google.com> wrote:
>
> On Thu, Jan 15, 2026 at 6:18 PM SeongJae Park <sj@kernel.org> wrote:
> >
> > On Thu, 15 Jan 2026 09:05:25 -0800 Suren Baghdasaryan <surenb@google.com> wrote:
> >
> > > On Wed, Jan 14, 2026 at 9:57 PM Matthew Wilcox <willy@infradead.org> wrote:
> > > >
> > > > On Wed, Jan 14, 2026 at 09:45:57PM -0800, Suren Baghdasaryan wrote:
> > > > > + 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,
> >
> > Acked-by: SeongJae Park <sj@kernel.org>
>
> Thanks!
>
> >
> > Fwiw, the typo is also on the .../sysctl/vm.rst part.
>
> Correct, I'll fix in both places.
v2 is posted at
https://lore.kernel.org/all/20260116184423.2708363-1-surenb@google.com/
>
> > 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.
>
> Yes, I didn't want to complicate reader's life by adding a reference
> for a couple of sentences.
>
> >
> >
> > Thanks,
> > SJ
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-16 18:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-15 5:45 [PATCH 1/1] Docs/mm/allocation-profiling: describe sysctrl limitations in debug mode Suren Baghdasaryan
2026-01-15 5:57 ` Matthew Wilcox
2026-01-15 17:05 ` Suren Baghdasaryan
2026-01-16 2:18 ` SeongJae Park
2026-01-16 18:30 ` Suren Baghdasaryan
2026-01-16 18:45 ` Suren Baghdasaryan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox