Re: Tasks RCU vs Preempt RCU

From: Joel Fernandes
Date: Sat May 19 2018 - 20:01:21 EST


On Sat, May 19, 2018 at 05:49:38PM -0700, Paul E. McKenney wrote:
[...]
> > > And the problem with wrapping them with rcu_read_{lock,unlock} is that
> > > there would be a point before the trampoline executed rcu_read_lock()
> > > but while it was on the trampoline. Nothing good comes from this. ;-)
> >
> > Yes, I see what you're saying. The data being protected and freed in this
> > case is the code so relying on it to do the rcu_read_lock seems infeasible.
> > Conceptually atleast, I feel this can be fixed by cleverly implementing
> > trampolines such that the rcu_read_lock isn't done during the trampoline
> > execution. But I am not very experienced with how the trampolines work to say
> > definitely whether it is or isn't possible or worth it. But atleast I felt it
> > was a worthwhile food for thought ;)
>
> I suggested to Steven that the rcu_read_lock() and rcu_read_unlock() might
> be outside of the trampoline, but this turned out to be infeasible. Not
> that I remember why! ;-)
>
> > I actually want to trace out the trampoline executing as it pertains to RCU,
> > with your latest rcu/dev.. I think it will be fun :)
>
> Cool!
>
> In addition, if you are interested, it might be worth looking for fields
> in rcu_dynticks, rcu_data, rcu_node, and rcu_state that are no longer
> actually used. It might also be worth looking for RCU macros that are
> no longer used.

Yes, definitely interested. Will keep an eye out for such fields and macros.

thanks!

- Joel