Re: [PATCH v4 5/5] blktrace: Make init_blk_tracer() asynchronous when trace_async_init set

From: Steven Rostedt

Date: Thu Jan 29 2026 - 22:26:35 EST


On Fri, 30 Jan 2026 11:09:26 +0800
Yaxiong Tian <tianyaxiong@xxxxxxxxxx> wrote:

> > thought|trace_eval_sync()|'s|destroy_workqueue()|would wait for all
> > tasks to complete, but it seems that might not be the case. From this,
> > if the above conclusion is true, then strictly speaking, tasks
> > using|queue_work(xx)|cannot be guaranteed to finish before the init
> > process executes. If it's necessary to strictly ensure initialization
> > completes before user space starts,
> > using|async_synchronize_full()|or|async_synchronize_full_domain()|would
> > be better in such scenarios.
> I need to double-check this issue—theoretically, it shouldn't exist. But
> I'm not sure why the print appeared at the 14-second mark.

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 :-/

-- Steve


> >
> > Of course, the situation described above is an extreme case. I don't
> > oppose this approach; I only hope to make the startup faster for
> > ordinary users who don’t use trace, while minimizing the impact on
> > others as much as possible.
> >