linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: ranxiaokai627@163.com
To: surenb@google.com, vbabka@suse.cz, kent.overstreet@linux.dev,
	akpm@linux-foundation.org, david@kernel.org,
	lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
	rppt@kernel.org, mhocko@suse.com, corbet@lwn.net
Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, ran.xiaokai@zte.com.cn,
	ranxiaokai627@163.com
Subject: [PATCH] alloc_tag: remove sysctl prefix from mem_profiling boot parameter
Date: Fri,  9 Jan 2026 06:24:19 +0000	[thread overview]
Message-ID: <20260109062419.157284-1-ranxiaokai627@163.com> (raw)

From: Ran Xiaokai <ran.xiaokai@zte.com.cn>

Boot parameters prefixed with "sysctl." are processed separately
during the final stage of system initialization via kernel_init()->
do_sysctl_args(). Since mem_profiling support should be parsed
in early boot stage, it is unsuitable for centralized handling
in do_sysctl_args().
Also, when CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled,
the sysctl.vm.mem_profiling entry is not writable and will cause
a warning. To prevent duplicate processing of sysctl.vm.mem_profiling,
rename the boot parameter to "mem_profiling".

Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
---
 Documentation/mm/allocation-profiling.rst | 2 +-
 lib/alloc_tag.c                           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/mm/allocation-profiling.rst b/Documentation/mm/allocation-profiling.rst
index 316311240e6a..fe341d6da7b9 100644
--- a/Documentation/mm/allocation-profiling.rst
+++ b/Documentation/mm/allocation-profiling.rst
@@ -18,7 +18,7 @@ kconfig options:
   missing annotation
 
 Boot parameter:
-  sysctl.vm.mem_profiling={0|1|never}[,compressed]
+  mem_profiling={0|1|never}[,compressed]
 
   When set to "never", memory allocation profiling overhead is minimized and it
   cannot be enabled at runtime (sysctl becomes read-only).
diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c
index 846a5b5b44a4..81b248196629 100644
--- a/lib/alloc_tag.c
+++ b/lib/alloc_tag.c
@@ -747,7 +747,7 @@ static int __init setup_early_mem_profiling(char *str)
 
 	return 0;
 }
-early_param("sysctl.vm.mem_profiling", setup_early_mem_profiling);
+early_param("mem_profiling", setup_early_mem_profiling);
 
 static __init bool need_page_alloc_tagging(void)
 {
-- 
2.25.1




             reply	other threads:[~2026-01-09  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  6:24 ranxiaokai627 [this message]
2026-01-11  2:12 ` Andrew Morton
2026-01-11  2:33 ` Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260109062419.157284-1-ranxiaokai627@163.com \
    --to=ranxiaokai627@163.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox