[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v2 08/15] bpf, x86: Maintain Tasks RCU trampoline nesting in the BPF trampoline
- To: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
- From: David Laight <david.laight.linux@xxxxxxxxx>
- Date: Sun, 13 Sep 2026 12:28:59 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date"
- Cc: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Frederic Weisbecker <frederic@xxxxxxxxxx>, Neeraj Upadhyay <neeraj.upadhyay@xxxxxxxxxx>, Joel Fernandes <joelagnelf@xxxxxxxxxx>, Boqun Feng <boqun@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>, Andrii Nakryiko <andrii@xxxxxxxxxx>, x86@xxxxxxxxxx, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Puranjay Mohan <puranjay@xxxxxxxxxx>, Xu Kuohai <xukuohai@xxxxxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Josh Triplett <josh@xxxxxxxxxxxxxxxx>, Uladzislau Rezki <urezki@xxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, Lai Jiangshan <jiangshanlai@xxxxxxxxx>, Zqiang <qiang.zhang@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Luis Chamberlain <mcgrof@xxxxxxxxxx>, Ihor Solodrai <ihor.solodrai@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, rcu@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Sun, 13 Sep 2026 11:29:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sat, 12 Sep 2026 15:31:24 -0700
"Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote:
> On Sat, Sep 12, 2026 at 10:14:00PM +0100, David Laight wrote:
> > On Sat, 12 Sep 2026 11:03:34 -0700
> > "Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote:
> >
> > > In the old kernels, yes, we have current->trc_reader_nesting++.
> > > In the newer kernels, Tasks Trace RCU is instead implemented in terms
> > > of SRCU-fast, which instead increments per-CPU counters. Which among
> > > other thins is a bit faster and does not need to hook into the scheduler.
> > >
> >
> > Isn't that rather architecture dependant?
> > It is fine on x86, but on arm incrementing a per-cpu variable is
> > significantly expensive.
>
> Last I heard, slow ARM increments of per-CPU variables were to be a
> transitory phenomemon. Plus changes late last year greatly sped up the
> per-CPU increment operations.
There are some unapplied patches to improve per-cpu operations for both
arm64 and s390.
Without those preemption has to be disabled (in current->xxx) which requires
a conditional call in the preempt enable path.
David
> Plus this change removed some hundreds
> of lines of RCU code.
>
> Thanx, Paul
>
|