Re: [patch] Real-Time Preemption, -RT-2.6.12-rc1-V0.7.41-07

Paul E. McKenney
2005-03-24T07:46:08Z

On Thu, Mar 24, 2005 at 06:34:56AM +0100, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@us.ibm.com> wrote:
>
> > Now, it is true that CPU#2 might record a quiescent state during this
> > time, but this will have no effect because -all- CPUs must pass
> > through a quiescent state before any callbacks will be invoked. Since
> > CPU#1 is refusing to record a quiescent state, grace periods will be
> > blocked for the full extent of task 1's RCU read-side critical
> > section.
>
> ok, great. So besides the barriers issue (and the long grace period time
> issue), the current design is quite ok. And i think your original flip
> pointers suggestion can be used to force synchronization.

The thing I am currently struggling with on the flip-pointers approach is
handling races between rcu_read_lock() and the flipping. In the earlier
implementations that used this trick, you were guaranteed that if you were
executing concurrently with one flip, you would do a voluntary context
switch before the next flip happened, so that the race was harmless.
This guarantee does not work in the PREEMPT_RT case, so more thought
will be required. :-/

Thanx, Paul