Re: [PATCH v2 08/11] perf/uprobe: Convert (some) uprobe->refcount to SRCU

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > With handle_swbp() hitting concurrently on (all) CPUs, potentially on > the same uprobe, the uprobe->refcount can get *very* hot. Move the > struct uprobe lifetime into uprobes_srcu such that it covers both the > uprobe and the uprob

Re: [PATCH v2 08/11] perf/uprobe: Convert (some) uprobe->refcount to SRCU

2024-07-11 Thread Jiri Olsa
On Thu, Jul 11, 2024 at 01:02:43PM +0200, Peter Zijlstra wrote: SNIP > /* Tracing handlers use ->utask to communicate with fetch methods */ > if (!get_utask()) > - goto out; > + return; > > if (arch_uprobe_ignore(&uprobe->arch, regs)) > - go

[PATCH v2 08/11] perf/uprobe: Convert (some) uprobe->refcount to SRCU

2024-07-11 Thread Peter Zijlstra
With handle_swbp() hitting concurrently on (all) CPUs, potentially on the same uprobe, the uprobe->refcount can get *very* hot. Move the struct uprobe lifetime into uprobes_srcu such that it covers both the uprobe and the uprobe->consumers list. With this, handle_swbp() can use a single large SRCU