On Tue, Nov 05, 2024 at 12:27:42AM +0100, Frederic Weisbecker wrote: > Le Tue, Oct 15, 2024 at 09:11:05AM -0700, Paul E. McKenney a écrit : > > This patch adds srcu_read_lock_lite() and srcu_read_unlock_lite(), which > > dispense with the read-side smp_mb() but also are restricted to code > > regions that RCU is watching. If a given srcu_struct structure uses > > srcu_read_lock_lite() and srcu_read_unlock_lite(), it is not permitted > > to use any other SRCU read-side marker, before, during, or after. > > > > Another price of light-weight readers is heavier weight grace periods. > > Such readers mean that SRCU grace periods on srcu_struct structures > > used by light-weight readers will incur at least two calls to > > synchronize_rcu(). In addition, normal SRCU grace periods for > > light-weight-reader srcu_struct structures never auto-expedite. > > Note that expedited SRCU grace periods for light-weight-reader > > srcu_struct structures still invoke synchronize_rcu(), not > > synchronize_srcu_expedited(). Something about wishing to keep > > the IPIs down to a dull roar. > > > > The srcu_read_lock_lite() and srcu_read_unlock_lite() functions may not > > (repeat, *not*) be used from NMI handlers, but if this is needed, an > > additional flavor of SRCU reader can be added by some future commit. > > > > [ paulmck: Apply Alexei Starovoitov expediting feedback. ] > > [ paulmck: Apply kernel test robot feedback. ] > > > > Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx> > > Tested-by: kernel test robot <oliver.sang@xxxxxxxxx> > > Cc: Alexei Starovoitov <ast@xxxxxxxxxx> > > Cc: Andrii Nakryiko <andrii@xxxxxxxxxx> > > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > > Cc: Kent Overstreet <kent.overstreet@xxxxxxxxx> > > Cc: <bpf@xxxxxxxxxxxxxxx> > > This might be a dump question but I have to ask. Could this replace > RCU-TASKS-TRACE?