Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Tracing: Accelerate Kernel Boot by Asynchronizing
@ 2026-01-27  1:20 Yaxiong Tian
  2026-01-27  1:23 ` [PATCH v3 1/3] tracing: Rename `eval_map_wq` and allow other parts of tracing use it Yaxiong Tian
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Yaxiong Tian @ 2026-01-27  1:20 UTC (permalink / raw)
  To: rostedt, axboe, mhiramat, mathieu.desnoyers
  Cc: linux-block, linux-kernel, linux-trace-kernel, Yaxiong Tian

On my ARM64 platform, I observed that certain tracing module
initializations run for up to 200ms—for example, init_kprobe_trace().
Analysis reveals the root cause: the execution flow eval_map_work_func()
→trace_event_update_with_eval_map()→trace_event_update_all()
is highly time-consuming. Although this flow is placed in eval_map_wq
for asynchronous execution, it holds the trace_event_sem lock, causing
other modules to be blocked either directly or indirectly.

To resolve this issue, I rename `eval_map_wq` and make it global and moved
other initialization functions under the tracing subsystem that are
related to this lock to run asynchronously on this workqueue. After this
optimization, boot time is reduced by approximately 200ms.

---
Changes in v2:
- Rename eval_map_wq to trace_init_wq.
Changes in v3:
- Opt PATCH 1/3 commit

Yaxiong Tian (3):
  tracing: Rename `eval_map_wq` and allow other parts of tracing use it
  tracing/kprobes: Make setup_boot_kprobe_events() asynchronous
  blktrace: Make init_blk_tracer() asynchronous

 kernel/trace/blktrace.c     | 23 ++++++++++++++++++++++-
 kernel/trace/trace.c        | 18 +++++++++---------
 kernel/trace/trace.h        |  2 ++
 kernel/trace/trace_kprobe.c | 14 +++++++++++++-
 4 files changed, 46 insertions(+), 11 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-28  8:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27  1:20 [PATCH v3 0/3] Tracing: Accelerate Kernel Boot by Asynchronizing Yaxiong Tian
2026-01-27  1:23 ` [PATCH v3 1/3] tracing: Rename `eval_map_wq` and allow other parts of tracing use it Yaxiong Tian
2026-01-27  1:23 ` [PATCH v3 2/3] tracing/kprobes: Make setup_boot_kprobe_events() asynchronous Yaxiong Tian
2026-01-28  4:49   ` Masami Hiramatsu
2026-01-28  7:24     ` Yaxiong Tian
2026-01-28  7:53       ` Masami Hiramatsu
2026-01-28  8:39         ` Yaxiong Tian
2026-01-27  1:23 ` [PATCH v3 3/3] blktrace: Make init_blk_tracer() asynchronous Yaxiong Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox