Re: tasks-trace RCU: question about grace period forward progress

From: Paul E. McKenney
Date: Thu Feb 25 2021 - 18:06:33 EST


On Thu, Feb 25, 2021 at 11:23:18PM +0100, Peter Zijlstra wrote:
> On Thu, Feb 25, 2021 at 10:33:21AM -0800, Paul E. McKenney wrote:
> > One question for Peter... Does each and every context switch imply a
> > full barrier?
>
> Yes, also see the smp_mb__after_spinlock() in __schedule() :-)

Whew!!! ;-)

Yeah, I could make RCU Tasks Trace deal with lack of a full barrier in
that case, but I would rather not... I could imagine optimizing so
that the full barrier happened only when tasks migrated, but I could
also imagine a world of hurt stemming from such an optimization!

Thanx, Paul