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

From: Paul E. McKenney
Date: Thu Mar 24 2005 - 02:47:28 EST


On Thu, Mar 24, 2005 at 06:34:56AM +0100, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@xxxxxxxxxx> 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
-
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/