lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260128125421.1713134-1-tianyaxiong@kylinos.cn>
Date: Wed, 28 Jan 2026 20:54:21 +0800
From: Yaxiong Tian <tianyaxiong@...inos.cn>
To: mhiramat@...nel.org,
	rostedt@...dmis.org,
	axboe@...nel.dk,
	mathieu.desnoyers@...icios.com,
	corbet@....net,
	skhan@...uxfoundation.org
Cc: linux-trace-kernel@...r.kernel.org,
	linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org,
	Yaxiong Tian <tianyaxiong@...inos.cn>
Subject: [PATCH v4 2/5] tracing: add trace_async_init boot parameter

Some users prioritize faster kernel boot time. However, the tracing
subsystem, being a critical infrastructure, traditionally initializes
serially. To balance the need for deterministic timing in tracing
against the demand for quicker startup, the trace_async_init boot
parameter is introduced.

When users do not require strict timing determinism for trace
features—or do not use tracing at all during boot—they can add this
cmdline parameter to accelerate kernel startup.

Suggested-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Signed-off-by: Yaxiong Tian <tianyaxiong@...inos.cn>
---
 Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++
 kernel/trace/trace.c                            | 9 +++++++++
 kernel/trace/trace.h                            | 1 +
 3 files changed, 18 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6b3460701910..d46fdfbfa961 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -7851,6 +7851,14 @@ Kernel parameters
 			This option can also be set at run time via the sysctl
 			option:  kernel/traceoff_on_warning
 
+	trace_async_init
+			[FTRACE] Enable this option when faster boot time is the
+			priority. It is beneficial in scenarios where users either
+			do not require a strict initialization order for certain
+			tracing features during boot, or do not use tracing at all
+			in the early boot phase. This can lead to measurable
+			improvements in kernel startup speed.
+
 	transparent_hugepage=
 			[KNL]
 			Format: [always|madvise|never]
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 01df88e77818..9d571841fc84 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1725,6 +1725,15 @@ static int __init set_tracing_thresh(char *str)
 }
 __setup("tracing_thresh=", set_tracing_thresh);
 
+bool trace_async_init __initdata;
+
+static int __init setup_trace_async_init(char *str)
+{
+	trace_async_init = true;
+	return 1;
+}
+__setup("trace_async_init", setup_trace_async_init);
+
 unsigned long nsecs_to_usecs(unsigned long nsecs)
 {
 	return nsecs / 1000;
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 9e8d52503618..63ae83d7bd1c 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -769,6 +769,7 @@ extern cpumask_var_t __read_mostly tracing_buffer_mask;
 extern unsigned long nsecs_to_usecs(unsigned long nsecs);
 
 extern unsigned long tracing_thresh;
+extern bool trace_async_init __initdata;
 extern struct workqueue_struct *trace_init_wq __initdata;
 
 /* PID filtering */
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ