Re: [PATCH RFC tip/core/rcu 0/5] Expedited grace periods encouraging normal ones

From: Paul E. McKenney
Date: Wed Jul 01 2015 - 10:00:53 EST


On Wed, Jul 01, 2015 at 12:55:11PM +0200, Peter Zijlstra wrote:
> On Wed, Jul 01, 2015 at 12:09:39PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 30, 2015 at 04:46:33PM -0700, josh@xxxxxxxxxxxxxxxx wrote:
> > > Consider it a fairly weak concern against. Increasing performance seems
> > > like a good thing in general; I just don't relish the future "feels less
> > > responsive" bug reports that take a long time to track down and turn out
> > > to be "this completely unrelated driver was loaded and started using
> > > expedited grace periods".
> >
> > random drivers, or for that matter, new-code of any sort. Should _NOT_
> > be using expedited grace periods.
> >
> > They're a horrid hack only suitable for unfixable ABI.
>
> Let me repeat, just in case I've not been clear. Expedited grace periods
> are _BAD_ and should be avoided at all costs.

That is a bit extreme, Peter.

There should not be a problem using them for operations that are not done
while the system is running the main workload. Which is why I am OK with
synchronize_net() using synchronize_rcu_expedited() when RTNL is held.
The operations that do that are setup/configuration operations that you
won't normally be doing while your HPC or realtime workload is running.

I believe that many of the other uses are similar.

> They perturb the _entire_ machine.

The portion of the machine that is non-idle and not executing in nohz_full
userspace, that is. So nohz_full usermode execution is unperturbed by
expedited grace periods.

In addition, synchronize_srcu_expedited() does -not- perturb anything
other than the task actually executing synchronize_srcu_expedited().
So those read-side memory barriers are gaining you something, and there
should not be much need to push back on synchronize_srcu_expedited().

> Yes we can polish the turd, but in the end its still a turd.

And I intend to polish it even more. ;-)

> Sadly people seem to have taken a liking to them, ooh a make RCU go
> faster button. And there's not been much if any pushback on people using
> it.

There aren't all that many uses, so I don't believe that
people are abusing it that much. There are only four non-RCU
uses of synchronize_rcu_expedited() and only two non-RCU uses of
synchronize_sched_expedited(). In contrast, there are a couple hundred
uses of synchronize_rcu() and about 40 uses of synchronize_sched().

So I am not seeing much evidence of wanton use of either
synchronize_srcu() or synchronize_sched().

Are a huge pile of them coming in this merge window or something?
What raised your concerns on this issue?

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/