Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2024 at 4:41 AM Peter Zijlstra wrote: > > On Fri, Jul 12, 2024 at 02:43:52PM -0700, Andrii Nakryiko wrote: > > + bpf > > > > On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > > > > > In order to put a bound on the uretprobe_srcu critical section, add a > > > timer to uprob

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-15 Thread Peter Zijlstra
On Fri, Jul 12, 2024 at 02:43:52PM -0700, Andrii Nakryiko wrote: > + bpf > > On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > > > In order to put a bound on the uretprobe_srcu critical section, add a > > timer to uprobe_task. Upon every RI added or removed the timer is > > pushed forward

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-12 Thread Andrii Nakryiko
+ bpf On Thu, Jul 11, 2024 at 4:07 AM Peter Zijlstra wrote: > > In order to put a bound on the uretprobe_srcu critical section, add a > timer to uprobe_task. Upon every RI added or removed the timer is > pushed forward to now + 1s. If the timer were ever to fire, it would > convert the SRCU 'refe

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-11 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 05:55:42PM +0200, Peter Zijlstra wrote: > On Thu, Jul 11, 2024 at 05:00:54PM +0200, Peter Zijlstra wrote: > > > Let me ponder that a little, I *can* make it work, but all 'solutions' > > I've come up with so far are really rather vile. > > This is the least horrible soluti

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-11 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 05:00:54PM +0200, Peter Zijlstra wrote: > Let me ponder that a little, I *can* make it work, but all 'solutions' > I've come up with so far are really rather vile. This is the least horrible solution I could come up with... --- --- a/include/linux/uprobes.h +++ b/include/

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-11 Thread Peter Zijlstra
On Thu, Jul 11, 2024 at 03:19:19PM +0200, Oleg Nesterov wrote: > Not sure I read this patch correctly, but at first glance it looks > suspicious.. > > On 07/11, Peter Zijlstra wrote: > > > > +static void return_instance_timer(struct timer_list *timer) > > +{ > > + struct uprobe_task *utask = con

Re: [PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-11 Thread Oleg Nesterov
Not sure I read this patch correctly, but at first glance it looks suspicious.. On 07/11, Peter Zijlstra wrote: > > +static void return_instance_timer(struct timer_list *timer) > +{ > + struct uprobe_task *utask = container_of(timer, struct uprobe_task, > ri_timer); > + task_work_add(utas

[PATCH v2 11/11] perf/uprobe: Add uretprobe timer

2024-07-11 Thread Peter Zijlstra
In order to put a bound on the uretprobe_srcu critical section, add a timer to uprobe_task. Upon every RI added or removed the timer is pushed forward to now + 1s. If the timer were ever to fire, it would convert the SRCU 'reference' to a refcount reference if possible. Signed-off-by: Peter Zijlst