Re: [PATCH RFC 5/8] rcu: Use rcu_node as temporary variable in funnel locking loop

From: Joel Fernandes
Date: Mon May 14 2018 - 20:43:39 EST


On Mon, May 14, 2018 at 11:00:27AM -0700, Paul E. McKenney wrote:
> On Sun, May 13, 2018 at 08:15:38PM -0700, Joel Fernandes (Google) wrote:
> > The funnel locking loop in rcu_start_this_gp uses rcu_root as a
> > temporary variable while walking the combining tree. This causes a
> > tiresome exercise of a code reader reminding themselves that rcu_root
> > may not be root. Lets just call it rcu_node, and then finally when
> > rcu_node is the rcu_root, lets assign it at that time.
> >
> > Just a clean up patch, no logical change.
> >
> > Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
>
> I agree that my names could use some improvement, but given that you
> called it rnp_node in the patch and rcu_node in the commit log, I would
> argue that rnp_node has a Hamming-distance problem. ;-)
>
> How about rnp_start for the formal parameter, rnp for the cursor running
> up the tree, and retaining rnp_root for the root?

Ok, that's fine with me. Probably easier to read too. I will rewrite it
accordingly.

thanks,

- Joel