Re: [PATCH tip/core/rcu 23/41] sched: Replace synchronize_sched() with synchronize_rcu()

From: Peter Zijlstra
Date: Sun Nov 11 2018 - 19:53:51 EST


On Sun, Nov 11, 2018 at 04:45:28PM -0800, Paul E. McKenney wrote:
> On Mon, Nov 12, 2018 at 01:12:33AM +0100, Peter Zijlstra wrote:
> > On Sun, Nov 11, 2018 at 11:43:52AM -0800, Paul E. McKenney wrote:
> > > Now that synchronize_rcu() waits for preempt-disable regions of code
> > > as well as RCU read-side critical sections, synchronize_sched() can be
> > > replaced by synchronize_rcu(). This commit therefore makes this change.
> >
> > Yes, but it also waits for an actual RCU quiestent state, which makes
> > synchoinize_rcu() potentially much more expensive than an actual
> > synchronize_sched().
>
> None of the readers have changed.
>
> For the updaters, if CONFIG_PREEMPT=n, synchronize_rcu() and
> synchronize_sched() always were one and the same. When CONFIG_PREEMPT=y,
> synchronize_rcu() and synchronize_sched() are now one and the same.

The Changelog does not state this; and does the commit that makes that
happen state the regression potential?

> > So why are we doing this?
>
> Given that synchronize_rcu() and synchronize_sched() are now always one
> and the same, this is a distinction without a difference.

The Changelog did not state a reason for the patch. Therefore it is a
bad patch.