Re: [PATCH] An RCU for SMP with a single CPU garbage collector

From: Joe Korty
Date: Mon Mar 07 2011 - 16:34:09 EST


On Mon, Mar 07, 2011 at 04:16:13PM -0500, Korty, Joe wrote:
> On Mon, Mar 07, 2011 at 04:01:57PM -0500, Paul E. McKenney wrote:
>> If not, what is
>> doing the RCU read-side critical sections on the dedicated CPUs?

Oops, forgot to answer this. RCU critical regions are
delimited by preempt_enable ... preempt_disable. There is
a tie-in to preempt_disable(): it sets a special per-cpu
variable to zero whenever preempt_count() goes to zero.

The per-cpu variables are all periodically examined by
the the global garbage collector. The current batch ends
when all of the per-cpu variables have gone to zero. It
then resets each to 1 or to 0, depending on the current
state of the corresponding cpu.

Regards,
Joe
--
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/