Messages in this thread |  | | Date | Wed, 10 Aug 2011 11:03:31 -0400 | | From | Josh Boyer <> | | Subject | Re: 3.0-git15 Atomic scheduling in pidmap_init |
| |
On Wed, Aug 10, 2011 at 04:53:41PM +0200, Frederic Weisbecker wrote: > 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. > */ > rdp->n_rp_qs_pending++; > if (!rdp->preemptible && > ULONG_CMP_LT(ACCESS_ONCE(rsp->jiffies_force_qs) - 1, > jiffies)) > set_need_resched(); > } >
Yes.
> 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.
Ok. I missed that cpu_needs_another_gp() would somehow prevent rsp->jiffies_force_qs from getting set.
> With ULONG_CMP_LT taking care of (-1 < jiffies) to be valid even with > ulong, then we are fine I guess.
I'd be happy to test a patch to make sure :)
josh
|  |