Commit cb7d761b authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Andrew Morton
Browse files

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).

Link: https://lkml.kernel.org/r/20260116184423.2708363-1-surenb@google.com


Fixes: ebdf9ad4 ("memprofiling: documentation")
Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Acked-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Cc: SeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 35e24703
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -494,6 +494,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
=========================
+10 −0
Original line number Diff line number Diff line
@@ -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