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

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

From: Jinchao Wang <hidden>
Date: 2026-09-14 06:16:40
Also in: linux-doc, linux-perf-users, lkml

On 9/12/2026 9:36 PM, Masami Hiramatsu (Google) wrote:
On Fri, 11 Sep 2026 15:27:41 +0800
Jinchao Wang [off-list ref] wrote:
quoted
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?
Yes, that makes sense.
Thanks,
quoted
What do you think?

Thanks,
Jinchao
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help