Re: 3.0-git15 Atomic scheduling in pidmap_init

From: Frederic Weisbecker
Date: Wed Aug 10 2011 - 10:53:51 EST

On Wed, Aug 10, 2011 at 08:45:29AM -0400, Josh Boyer wrote:
> On Tue, Aug 09, 2011 at 01:35:18PM +0200, Frederic Weisbecker wrote:
> > > But setting rdp->qs_pending to 1 in rcu_init_percpu_data() has no effect
> > > until a grace period starts. So, if grace periods are prevented from
> Er... really? Because it gets set and __rcu_pending looks at it
> unconditionally in the case that is calling set_need_resched. It
> doesn't check if there is anything about a grace period going on or not.

You mean this?

if (rdp->qs_pending && !rdp->passed_quiesc) {

* If force_quiescent_state() coming soon and this CPU
* needs a quiescent state, and this is either RCU-sched
* or RCU-bh, force a local reschedule.
if (!rdp->preemptible &&
ULONG_CMP_LT(ACCESS_ONCE(rsp->jiffies_force_qs) - 1,

On boot, if we don't start a grace period, we don't schedule a grace period forcing,
so rsp->jiffies_force_qs is 0.

With ULONG_CMP_LT taking care of (-1 < jiffies) to be valid even with
ulong, then we are fine I guess.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at