Re: [PATCH] a local-timer-free version of RCU

From: Mathieu Desnoyers
Date: Sat Nov 06 2010 - 16:03:16 EST


Hi Joe,

Thanks for sending these patches. Here are some comments below,

* Joe Korty (joe.korty@xxxxxxxx) wrote:
[...]
>
> Jim Houston's timer-less version of RCU.
>
> This rather ancient version of RCU handles RCU garbage
> collection in the absence of a per-cpu local timer
> interrupt.
>
> This is a minimal forward port to 2.6.36. It works,
> but it is not yet a complete implementation of RCU.
>
> Developed-by: Jim Houston <jim.houston@xxxxxxxx>
> Signed-off-by: Joe Korty <joe.korty@xxxxxxxx>
>
[...]
> +/*
> + * rcu_quiescent() is called from rcu_read_unlock() when a
> + * RCU batch was started while the rcu_read_lock/rcu_read_unlock
> + * critical section was executing.
> + */
> +
> +void rcu_quiescent(int cpu)
> +{
> + cpu_clear(cpu, rcu_state.rcu_cpu_mask);
> + if (cpus_empty(rcu_state.rcu_cpu_mask))
> + rcu_grace_period_complete();
> +}

These seems to be a race here when the number of CPUs is large enough to occupy
a bitmap larger than one word. Two unlock racing could each clear their own bit
on different words, and each thinking that the cpu mask is not empty, which
would hold the grace period forever.

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
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/