Re: [PATCH RFC tip/core/rcu 05/14] rcu: Abstract sequence counting from synchronize_sched_expedited()

Peter Zijlstra
2015-07-02T16:51:01Z

On Thu, Jul 02, 2015 at 07:13:30AM -0700, Paul E. McKenney wrote:

> > Its really time for them to stop wanking and stare reality in the face.
>
> Indeed, I have been and will be continuing to make myself unpopular with
> that topic. ;-)

Thanks!!

> > > > > +/* Wrapper functions for expedited grace periods. */
> > > > > +static void rcu_exp_gp_seq_start(struct rcu_state *rsp)
> > > > > +{
> > > > > + rcu_seq_start(&rsp->expedited_sequence);
> > > > > +}
> > > > > +static void rcu_exp_gp_seq_end(struct rcu_state *rsp)
> > > > > +{
> > > > > + rcu_seq_end(&rsp->expedited_sequence);
> > > > > +}
> > > > > +static unsigned long rcu_exp_gp_seq_snap(struct rcu_state *rsp)
> > > > > +{
> > > > > + return rcu_seq_snap(&rsp->expedited_sequence);
> > > > > +}
> > > > > +static bool rcu_exp_gp_seq_done(struct rcu_state *rsp, unsigned long s)
> > > > > +{
> > > > > + return rcu_seq_done(&rsp->expedited_sequence, s);
> > > > > +}
> > > >
> > > > This is wrappers for wrappers sake? Why?
> > >
> > > For _rcu_barrier(), as noted in the commit log.
> >
> > Yes it said; but why? Surely _rcu_barrier() can do the
> > ->expedited_sequence thing itself, that hardly seems worthy of a
> > wrapper.
>
> Ah, you want synchronize_rcu_expedited() and synchronize_sched_expedited()
> to use rcu_seq_start() and friends directly. I can certainly do that.

Well, 'want' is a strong word, I was just questioning the use of these
trivial wrappers.