Thread (19 messages) 19 messages, 4 authors, 2026-02-02

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

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-01-30 03:26:19
Also in: linux-block, linux-doc, lkml

On Fri, 30 Jan 2026 11:09:26 +0800
Yaxiong Tian [off-list ref] wrote:
quoted
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

quoted
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.
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help