mbox series

[v2,0/3] uprobes: two common case speed ups

Message ID 20240318181728.2795838-1-andrii@kernel.org (mailing list archive)
Headers show
Series uprobes: two common case speed ups | expand

Message

Andrii Nakryiko March 18, 2024, 6:17 p.m. UTC
This patch set implements two speed ups for uprobe/uretprobe runtime execution
path for some common scenarios: BPF-only uprobes (patches #1 and #2) and
system-wide (non-PID-specific) uprobes (patch #3). Please see individual
patches for details.

v1->v2:
  - rebased onto trace/core branch of tracing tree, hopefully I guessed right;
  - simplified user_cpu_buffer usage further (Oleg Nesterov);
  - simplified patch #3, just moved speculative check outside of lock (Oleg);
  - added Reviewed-by from Jiri Olsa.

Andrii Nakryiko (3):
  uprobes: encapsulate preparation of uprobe args buffer
  uprobes: prepare uprobe args buffer lazily
  uprobes: add speculative lockless system-wide uprobe filter check

 kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
 1 file changed, 59 insertions(+), 44 deletions(-)

Comments

Masami Hiramatsu (Google) March 19, 2024, 4:20 a.m. UTC | #1
Hi,

On Mon, 18 Mar 2024 11:17:25 -0700
Andrii Nakryiko <andrii@kernel.org> wrote:

> This patch set implements two speed ups for uprobe/uretprobe runtime execution
> path for some common scenarios: BPF-only uprobes (patches #1 and #2) and
> system-wide (non-PID-specific) uprobes (patch #3). Please see individual
> patches for details.

This series looks good to me. Let me pick it on probes/for-next.

Thanks!

> 
> v1->v2:
>   - rebased onto trace/core branch of tracing tree, hopefully I guessed right;
>   - simplified user_cpu_buffer usage further (Oleg Nesterov);
>   - simplified patch #3, just moved speculative check outside of lock (Oleg);
>   - added Reviewed-by from Jiri Olsa.
> 
> Andrii Nakryiko (3):
>   uprobes: encapsulate preparation of uprobe args buffer
>   uprobes: prepare uprobe args buffer lazily
>   uprobes: add speculative lockless system-wide uprobe filter check
> 
>  kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
>  1 file changed, 59 insertions(+), 44 deletions(-)
> 
> -- 
> 2.43.0
>
Masami Hiramatsu (Google) March 19, 2024, 4:26 a.m. UTC | #2
On Tue, 19 Mar 2024 13:20:57 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> Hi,
> 
> On Mon, 18 Mar 2024 11:17:25 -0700
> Andrii Nakryiko <andrii@kernel.org> wrote:
> 
> > This patch set implements two speed ups for uprobe/uretprobe runtime execution
> > path for some common scenarios: BPF-only uprobes (patches #1 and #2) and
> > system-wide (non-PID-specific) uprobes (patch #3). Please see individual
> > patches for details.
> 
> This series looks good to me. Let me pick it on probes/for-next.

Ah, and 

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

for this series.

> 
> Thanks!
> 
> > 
> > v1->v2:
> >   - rebased onto trace/core branch of tracing tree, hopefully I guessed right;
> >   - simplified user_cpu_buffer usage further (Oleg Nesterov);
> >   - simplified patch #3, just moved speculative check outside of lock (Oleg);
> >   - added Reviewed-by from Jiri Olsa.
> > 
> > Andrii Nakryiko (3):
> >   uprobes: encapsulate preparation of uprobe args buffer
> >   uprobes: prepare uprobe args buffer lazily
> >   uprobes: add speculative lockless system-wide uprobe filter check
> > 
> >  kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
> >  1 file changed, 59 insertions(+), 44 deletions(-)
> > 
> > -- 
> > 2.43.0
> > 
> 
> 
> -- 
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
Oleg Nesterov March 19, 2024, 5:48 a.m. UTC | #3
On 03/18, Andrii Nakryiko wrote:
>
> Andrii Nakryiko (3):
>   uprobes: encapsulate preparation of uprobe args buffer
>   uprobes: prepare uprobe args buffer lazily
>   uprobes: add speculative lockless system-wide uprobe filter check
>
>  kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
>  1 file changed, 59 insertions(+), 44 deletions(-)

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Andrii Nakryiko March 19, 2024, 4:19 p.m. UTC | #4
On Mon, Mar 18, 2024 at 9:21 PM Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> Hi,
>
> On Mon, 18 Mar 2024 11:17:25 -0700
> Andrii Nakryiko <andrii@kernel.org> wrote:
>
> > This patch set implements two speed ups for uprobe/uretprobe runtime execution
> > path for some common scenarios: BPF-only uprobes (patches #1 and #2) and
> > system-wide (non-PID-specific) uprobes (patch #3). Please see individual
> > patches for details.
>
> This series looks good to me. Let me pick it on probes/for-next.

Great, at least I guessed the Git repo right, if not the branch.
Thanks for pulling it in! I assume some other uprobe-related follow up
patches should be based on probes/for-next as well, right?

>
> Thanks!
>
> >
> > v1->v2:
> >   - rebased onto trace/core branch of tracing tree, hopefully I guessed right;
> >   - simplified user_cpu_buffer usage further (Oleg Nesterov);
> >   - simplified patch #3, just moved speculative check outside of lock (Oleg);
> >   - added Reviewed-by from Jiri Olsa.
> >
> > Andrii Nakryiko (3):
> >   uprobes: encapsulate preparation of uprobe args buffer
> >   uprobes: prepare uprobe args buffer lazily
> >   uprobes: add speculative lockless system-wide uprobe filter check
> >
> >  kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
> >  1 file changed, 59 insertions(+), 44 deletions(-)
> >
> > --
> > 2.43.0
> >
>
>
> --
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
Masami Hiramatsu (Google) March 20, 2024, 3:17 a.m. UTC | #5
On Tue, 19 Mar 2024 09:19:19 -0700
Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote:

> On Mon, Mar 18, 2024 at 9:21 PM Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> > Hi,
> >
> > On Mon, 18 Mar 2024 11:17:25 -0700
> > Andrii Nakryiko <andrii@kernel.org> wrote:
> >
> > > This patch set implements two speed ups for uprobe/uretprobe runtime execution
> > > path for some common scenarios: BPF-only uprobes (patches #1 and #2) and
> > > system-wide (non-PID-specific) uprobes (patch #3). Please see individual
> > > patches for details.
> >
> > This series looks good to me. Let me pick it on probes/for-next.
> 
> Great, at least I guessed the Git repo right, if not the branch.
> Thanks for pulling it in! I assume some other uprobe-related follow up
> patches should be based on probes/for-next as well, right?

Yes, I'll pick those on linux-trace tree's probes/* branchs
(if there is an urgent patch, it will go through probes/fixes)

Thank you! 

> 
> >
> > Thanks!
> >
> > >
> > > v1->v2:
> > >   - rebased onto trace/core branch of tracing tree, hopefully I guessed right;
> > >   - simplified user_cpu_buffer usage further (Oleg Nesterov);
> > >   - simplified patch #3, just moved speculative check outside of lock (Oleg);
> > >   - added Reviewed-by from Jiri Olsa.
> > >
> > > Andrii Nakryiko (3):
> > >   uprobes: encapsulate preparation of uprobe args buffer
> > >   uprobes: prepare uprobe args buffer lazily
> > >   uprobes: add speculative lockless system-wide uprobe filter check
> > >
> > >  kernel/trace/trace_uprobe.c | 103 +++++++++++++++++++++---------------
> > >  1 file changed, 59 insertions(+), 44 deletions(-)
> > >
> > > --
> > > 2.43.0
> > >
> >
> >
> > --
> > Masami Hiramatsu (Google) <mhiramat@kernel.org>