Re: [PATCH] v3 Teach RCU that idle task is not quiscent state atboot

From: Paul E. McKenney
Date: Tue Feb 24 2009 - 23:44:16 EST


On Wed, Feb 25, 2009 at 05:12:59AM +0100, Nick Piggin wrote:
> Looks OK to me. It's a bit "theoretically" displeasing that
> you still treat synchronize_rcu as a gp even after we spawn
> some kernel threads.
>
> ... but it probably isn't worth trying to rearrange the boot
> code just to make this look better. I can't see any actual
> problems that could arise, as the threads should not have
> had a chance to run yet.

And if rcuclassic or rcutree on a UP system, even if threads have had
a chance to run, it is OK to treat synchronize_rcu() as a grace period,
since it has the opportunity to block.

> I wonder if you couldn't put in a WARN_ON(nr_context_switches() > 0)
> in rcu_idle_now_means_idle() just in case?

Makes a lot of sense -- updated and am firing off the tests!

Thanx, Paul

> On Tue, Feb 24, 2009 at 04:29:37PM -0800, Paul E. McKenney wrote:
> > This patch fixes a bug located by Vegard Nossum with the aid of
> > kmemcheck, updated based on review comments from Nick Piggin,
> > Ingo Molnar, and Andrew Morton.
--
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/