[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240715115954.GH14400@noisy.programming.kicks-ass.net>
Date: Mon, 15 Jul 2024 13:59:54 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: mingo@...nel.org, andrii@...nel.org, oleg@...hat.com,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
rostedt@...dmis.org, mhiramat@...nel.org, jolsa@...nel.org,
clm@...a.com, paulmck@...nel.org, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH v2 10/11] perf/uprobe: Convert single-step and uretprobe
to SRCU
On Fri, Jul 12, 2024 at 02:28:13PM -0700, Andrii Nakryiko wrote:
> > @@ -1814,7 +1822,7 @@ static int dup_utask(struct task_struct
> > return -ENOMEM;
> >
> > *n = *o;
> > - get_uprobe(n->uprobe);
> > + __srcu_clone_read_lock(&uretprobes_srcu, n->srcu_idx);
>
> do we need to add this __srcu_clone_read_lock hack just to avoid
> taking a refcount in dup_utask (i.e., on process fork)? This is not
> that frequent and performance-sensitive case, so it seems like it
> should be fine to take refcount and avoid doing srcu_read_unlock() in
> a new process. Just like the case with long-running uretprobes where
> you convert SRCU lock into refcount.
Yes, I suppose that is now possible too. But it makes the patches harder
to split. Let me ponder that after I get it to pass your stress thing.
Powered by blists - more mailing lists