Re: [PATCH 06/12] uprobes: add batch uprobe register/unregister APIs

2024-07-02 Thread Google
On Tue, 2 Jul 2024 12:53:20 -0400 Steven Rostedt wrote: > On Wed, 3 Jul 2024 00:19:05 +0900 > Masami Hiramatsu (Google) wrote: > > > > BTW, is this (batched register/unregister APIs) something you'd like > > > to use from the tracefs-based (or whatever it's called, I mean non-BPF > > > ones)

Re: [PATCH 06/12] uprobes: add batch uprobe register/unregister APIs

2024-07-02 Thread Andrii Nakryiko
On Tue, Jul 2, 2024 at 9:53 AM Steven Rostedt wrote: > > On Wed, 3 Jul 2024 00:19:05 +0900 > Masami Hiramatsu (Google) wrote: > > > > BTW, is this (batched register/unregister APIs) something you'd like > > > to use from the tracefs-based (or whatever it's called, I mean non-BPF > > > ones)

Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management

2024-07-02 Thread Andrii Nakryiko
On Tue, Jul 2, 2024 at 3:23 AM Peter Zijlstra wrote: > > On Mon, Jul 01, 2024 at 03:39:27PM -0700, Andrii Nakryiko wrote: > > > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > > index 23449a8c5e7e..560cf1ca512a 100644 > > --- a/kernel/events/uprobes.c > > +++

Re: [PATCH 06/12] uprobes: add batch uprobe register/unregister APIs

2024-07-02 Thread Steven Rostedt
On Wed, 3 Jul 2024 00:19:05 +0900 Masami Hiramatsu (Google) wrote: > > BTW, is this (batched register/unregister APIs) something you'd like > > to use from the tracefs-based (or whatever it's called, I mean non-BPF > > ones) uprobes as well? Or there is just no way to even specify a batch > > of

Re: [PATCH 06/12] uprobes: add batch uprobe register/unregister APIs

2024-07-02 Thread Google
On Mon, 1 Jul 2024 18:34:55 -0700 Andrii Nakryiko wrote: > > > How about this? I'll keep the existing get_uprobe_consumer(idx, ctx) > > > contract, which works for the only user right now, BPF multi-uprobes. > > > When it's time to add another consumer that works with a linked list, > > > we can

Re: [PATCH 2/2] hugetlbfs: use tracepoints in hugetlbfs functions.

2024-07-02 Thread Hongbo Li
On 2024/7/2 21:30, Mathieu Desnoyers wrote: On 2024-07-02 07:55, Hongbo Li wrote: On 2024/7/2 7:49, Steven Rostedt wrote: On Wed, 12 Jun 2024 09:11:56 +0800 Hongbo Li wrote: @@ -934,6 +943,12 @@ static int hugetlbfs_setattr(struct mnt_idmap *idmap,   if (error)   return

Re: [PATCH 2/2] hugetlbfs: use tracepoints in hugetlbfs functions.

2024-07-02 Thread Mathieu Desnoyers
On 2024-07-02 07:55, Hongbo Li wrote: On 2024/7/2 7:49, Steven Rostedt wrote: On Wed, 12 Jun 2024 09:11:56 +0800 Hongbo Li wrote: @@ -934,6 +943,12 @@ static int hugetlbfs_setattr(struct mnt_idmap *idmap,   if (error)   return error; +    trace_hugetlbfs_setattr(inode,

Re: [PATCH 2/2] hugetlbfs: use tracepoints in hugetlbfs functions.

2024-07-02 Thread Hongbo Li
On 2024/7/2 7:49, Steven Rostedt wrote: On Wed, 12 Jun 2024 09:11:56 +0800 Hongbo Li wrote: @@ -934,6 +943,12 @@ static int hugetlbfs_setattr(struct mnt_idmap *idmap, if (error) return error; + trace_hugetlbfs_setattr(inode, dentry->d_name.len,

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-02 Thread Peter Zijlstra
On Mon, Jul 01, 2024 at 03:39:23PM -0700, Andrii Nakryiko wrote: > This patch set, ultimately, switches global uprobes_treelock from RW spinlock > to per-CPU RW semaphore, which has better performance and scales better under > contention and multiple parallel threads triggering lots of uprobes.

Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management

2024-07-02 Thread Peter Zijlstra
On Mon, Jul 01, 2024 at 03:39:27PM -0700, Andrii Nakryiko wrote: > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index 23449a8c5e7e..560cf1ca512a 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -53,9 +53,10 @@