From: Steven Rostedt <rostedt@goodmis.org>
To: Yaxiong Tian <tianyaxiong@kylinos.cn>
Cc: Jens Axboe <axboe@kernel.dk>,
mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
corbet@lwn.net, skhan@linuxfoundation.org,
linux-trace-kernel@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v4 5/5] blktrace: Make init_blk_tracer() asynchronous when trace_async_init set
Date: Thu, 29 Jan 2026 22:31:16 -0500 [thread overview]
Message-ID: <20260129223116.489a01fd@robin> (raw)
In-Reply-To: <20260129222608.7000bffd@robin>
On Thu, 29 Jan 2026 22:26:08 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> Use trace_printk() instead. printk now has a "deferred" output. I'm not
> sure if the timestamps of when it prints is when the print took place
> or when it got to the console :-/
I added the below patch and have this result:
kworker/u33:1-79 [002] ..... 1.840855: trace_event_update_all: Start syncing
swapper/0-1 [005] ..... 6.045742: trace_eval_sync: sync maps
kworker/u33:1-79 [002] ..... 12.289296: trace_event_update_all: Finish syncing
swapper/0-1 [005] ..... 12.289387: trace_eval_sync: sync maps complete
Which shows that the final initcall waited for the work queue to complete:
-- Steve
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 396d59202438..33180d5622a8 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -10817,9 +10817,11 @@ subsys_initcall(trace_eval_init);
static int __init trace_eval_sync(void)
{
+ trace_printk("sync maps\n");
/* Make sure the eval map updates are finished */
if (eval_map_wq)
destroy_workqueue(eval_map_wq);
+ trace_printk("sync maps complete\n");
return 0;
}
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index af6d1fe5cab7..194b344400e9 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -3555,6 +3555,7 @@ void trace_event_update_all(struct trace_eval_map **map, int len)
int last_i;
int i;
+ trace_printk("Start syncing\n");
down_write(&trace_event_sem);
list_for_each_entry_safe(call, p, &ftrace_events, list) {
/* events are usually grouped together with systems */
@@ -3593,6 +3594,8 @@ void trace_event_update_all(struct trace_eval_map **map, int len)
cond_resched();
}
up_write(&trace_event_sem);
+ msleep(10000);
+ trace_printk("Finish syncing\n");
}
static bool event_in_systems(struct trace_event_call *call,
next prev parent reply other threads:[~2026-01-30 3:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 12:51 [PATCH v4 0/5] Tracing: Accelerate Kernel Boot by Asynchronizing Yaxiong Tian
2026-01-28 12:53 ` [PATCH v4 1/5] tracing: Rename `eval_map_wq` and allow other parts of tracing use it Yaxiong Tian
2026-01-28 12:54 ` [PATCH v4 2/5] tracing: add trace_async_init boot parameter Yaxiong Tian
2026-01-28 12:55 ` [PATCH v4 3/5] tracing/kprobes: Skip setup_boot_kprobe_events() when no cmdline event Yaxiong Tian
2026-01-28 12:55 ` [PATCH v4 4/5] tracing/kprobes: Make setup_boot_kprobe_events() asynchronous when trace_async_init set Yaxiong Tian
2026-01-28 12:55 ` [PATCH v4 5/5] blktrace: Make init_blk_tracer() " Yaxiong Tian
2026-01-29 0:41 ` Steven Rostedt
2026-01-29 2:25 ` Jens Axboe
2026-01-29 20:29 ` Steven Rostedt
2026-01-30 1:35 ` Yaxiong Tian
2026-01-30 3:09 ` Yaxiong Tian
2026-01-30 3:26 ` Steven Rostedt
2026-01-30 3:31 ` Steven Rostedt [this message]
2026-01-30 3:45 ` Steven Rostedt
2026-01-30 4:10 ` Yaxiong Tian
2026-01-30 9:30 ` Masami Hiramatsu
2026-01-30 9:59 ` Yaxiong Tian
2026-02-02 3:36 ` Yaxiong Tian
2026-01-28 23:38 ` [PATCH v4 0/5] Tracing: Accelerate Kernel Boot by Asynchronizing Masami Hiramatsu
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=20260129223116.489a01fd@robin \
--to=rostedt@goodmis.org \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tianyaxiong@kylinos.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.