On Fri, 11 Sep 2026 15:27:41 +0800
Jinchao Wang <[email protected]> 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) <[email protected]>

Reply via email to