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:	Thu, 2 Feb 2012 20:23:25 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org,
	"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH RFC tip/core/rcu 22/41] rcu: Simplify unboosting checks

On Thu, Feb 02, 2012 at 09:48:12AM -0800, Paul E. McKenney wrote:
> On Wed, Feb 01, 2012 at 06:38:47PM -0800, Josh Triplett wrote:
> > On Wed, Feb 01, 2012 at 11:41:40AM -0800, Paul E. McKenney wrote:
> > > From: "Paul E. McKenney" <paul.mckenney@...aro.org>
> > > 
> > > This is a port of commit #82e78d80 from TREE_PREEMPT_RCU to
> > > TINY_PREEMPT_RCU.
> > > 
> > > This commit uses the fact that current->rcu_boost_mutex is set
> > > any time that the RCU_READ_UNLOCK_BOOSTED flag is set in the
> > > current->rcu_read_unlock_special bitmask.  This allows tests of
> > > the bit to be changed to tests of the pointer, which in turn allows
> > > the RCU_READ_UNLOCK_BOOSTED flag to be eliminated.
> > 
> > Does this change affect rcu_read_unlock()'s logic to trigger the
> > slowpath only when special flags get set?
> 
> Interestingly enough, it does not.  The only way a task can be subjected
> to RCU priority boosting is for that task to block sometime in its
> current RCU read-side critical section.  When the task blocks, the
> RCU_READ_UNLOCK_BLOCKED flag will be set.  Therefore, any time that the
> current->rcu_boost_mutex pointer is non-NULL, the RCU_READ_UNLOCK_BLOCKED
> flag will be set, so the current test of current->rcu_read_unlock_special
> against zero continues to work correctly.

Makes sense; no sense boosting an RCU reader that already has a CPU to
run on.

> OK, OK, I will update the commit message with words to this effect.  ;-)

Thanks. :)

- Josh Triplett
--
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