Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Andrii Nakryiko
On Fri, Aug 30, 2024 at 1:21 PM Oleg Nesterov wrote: > > On 08/30, Andrii Nakryiko wrote: > > > > Andrii, let me reply to your email "out of order". First of all: > > > Can we please let me land these patches first? It's been a while. I > > don't think anything is really broken with the logic. > >

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Oleg Nesterov
On 08/30, Andrii Nakryiko wrote: > Andrii, let me reply to your email "out of order". First of all: > Can we please let me land these patches first? It's been a while. I > don't think anything is really broken with the logic. OK, agreed. I'll probably write another email (too late for me today)

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Andrii Nakryiko
On Fri, Aug 30, 2024 at 7:33 AM Oleg Nesterov wrote: > > On 08/30, Jiri Olsa wrote: > > > > with this change the probe will not get removed in the attached test, > > it'll get 2 hits, without this change just 1 hit > > I don't understand the code in tools/...bpf../ at all, can't comment, > > > but

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Oleg Nesterov
On 08/30, Jiri Olsa wrote: > > with this change the probe will not get removed in the attached test, > it'll get 2 hits, without this change just 1 hit I don't understand the code in tools/...bpf../ at all, can't comment, > but I'm not sure it's a big problem, because seems like that's not the >

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Oleg Nesterov
On 08/29, Andrii Nakryiko wrote: > > On Thu, Aug 29, 2024 at 4:10 PM Jiri Olsa wrote: > > > > > @@ -2101,17 +2110,24 @@ static void handler_chain(struct uprobe *uprobe, > > > struct pt_regs *regs) > > > need_prep = true; > > > > > > remove &= rc; > > > +

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-30 Thread Jiri Olsa
On Thu, Aug 29, 2024 at 04:31:18PM -0700, Andrii Nakryiko wrote: > On Thu, Aug 29, 2024 at 4:10 PM Jiri Olsa wrote: > > > > On Thu, Aug 29, 2024 at 11:37:37AM -0700, Andrii Nakryiko wrote: > > > uprobe->register_rwsem is one of a few big bottlenecks to scalability of > > > uprobes, so we need to g

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-29 Thread Andrii Nakryiko
On Thu, Aug 29, 2024 at 4:10 PM Jiri Olsa wrote: > > On Thu, Aug 29, 2024 at 11:37:37AM -0700, Andrii Nakryiko wrote: > > uprobe->register_rwsem is one of a few big bottlenecks to scalability of > > uprobes, so we need to get rid of it to improve uprobe performance and > > multi-CPU scalability. >

Re: [PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-29 Thread Jiri Olsa
On Thu, Aug 29, 2024 at 11:37:37AM -0700, Andrii Nakryiko wrote: > uprobe->register_rwsem is one of a few big bottlenecks to scalability of > uprobes, so we need to get rid of it to improve uprobe performance and > multi-CPU scalability. > > First, we turn uprobe's consumer list to a typical doubl

[PATCH v4 4/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-29 Thread Andrii Nakryiko
uprobe->register_rwsem is one of a few big bottlenecks to scalability of uprobes, so we need to get rid of it to improve uprobe performance and multi-CPU scalability. First, we turn uprobe's consumer list to a typical doubly-linked list and utilize existing RCU-aware helpers for traversing such li