lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Aug 2011 11:03:31 -0400
From:	Josh Boyer <jwboyer@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ