Thread (33 messages) flat view 33 messages, 3 authors, 3d ago

Re: [PATCH v15 00/12] tracing: wprobe: x86: Add wprobe for watchpoint

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2026-09-12 13:37:04
Also in: linux-doc, linux-perf-users, lkml

On Fri, 11 Sep 2026 15:27:41 +0800
Jinchao Wang [off-list ref] wrote:
Hi Masami,

I see the watch address update currently goes irq_work -> workqueue ->
on_each_cpu().  I would like to discuss that path.

The race window wprobe may be used to watch can be very narrow --
sometimes it lives entirely inside a single function -- and the trigger
does not always run in in_task() context.  The current path defers the
update to a work item, so by the time the debug registers are updated the
window may already be gone.

Now that we have modify_local_hw_breakpoint_addr(), the trigger could arm
the local CPU directly and use smp_call_function_single_async() for the
remote ones.  That should improve the overlap between the watch and the window.
Hm, that is a good idea. Maybe we can check the current context and if
possible call modify_local_hw_breakcpoint_addr() directly for current
CPU core, and kick irq_work for other cores.
Does this make sense for you?

Thanks,
What do you think?

Thanks,
Jinchao

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help