Re: [PATCH rcu 3/3] srcu: Unconditionally record srcu_read_lock_lite() in ->srcu_reader_flavor

From: Neeraj Upadhyay
Date: Mon Nov 11 2024 - 23:32:40 EST


...

> +void __srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor);
> +
> +// Record _lite() usage even for CONFIG_PROVE_RCU=n kernels.
> +static inline void srcu_check_read_flavor_lite(struct srcu_struct *ssp)
> +{
> + struct srcu_data *sdp = raw_cpu_ptr(ssp->sda);
> +
> + if (likely(READ_ONCE(sdp->srcu_reader_flavor) & SRCU_READ_FLAVOR_LITE))
> + return;
> +
> + // Note that the cmpxchg() in srcu_check_read_flavor() is fully ordered.

Nit: s/srcu_check_read_flavor/__srcu_check_read_flavor/

Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@xxxxxxx>


- Neeraj

> + __srcu_check_read_flavor(ssp, SRCU_READ_FLAVOR_LITE);
> +}
> +