* Ingo Molnar <[EMAIL PROTECTED]> wrote:

> hm, another thing: i think call_rcu() needs to take the read-lock.
> Right now it assumes that it has the data structure private, but
> that's only statistically true on PREEMPT_RT: another CPU may have
> this CPU's RCU control structure in use. So IRQs-off (or preempt-off)
> is not a guarantee to have the data structure, the read lock has to be
> taken.

i've reworked the code to use the read-lock to access the per-CPU data
RCU structures, and it boots with 2 CPUs and PREEMPT_RT now. The -40-05
patch can be downloaded from the usual place:

  http://redhat.com/~mingo/realtime-preempt/

had to add two hacks though:

 static void rcu_advance_callbacks(struct rcu_data *rdp)
 {
        if (rdp->batch != rcu_ctrlblk.batch) {
                if (rdp->donetail) // HACK
                        *rdp->donetail = rdp->waitlist;
                ...

 void fastcall call_rcu(struct rcu_head *head,
          void (*func)(struct rcu_head *rcu))
 [...]
        rcu_advance_callbacks(rdp);
        if (rdp->waittail) // HACK
                *rdp->waittail = head;
        ...

without them it crashes during bootup.

maybe we are better off with the completely unlocked read path and the
long grace periods.

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

Reply via email to