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:	Mon, 28 Nov 2011 17:00:36 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and
 rcu_user_exit_irq() APIs

On Mon, Nov 28, 2011 at 01:53:23PM -0800, Josh Triplett wrote:
> On Mon, Nov 28, 2011 at 10:24:47PM +0100, Frederic Weisbecker wrote:
> > A CPU running in adaptive tickless mode wants to enter into
> > RCU extended quiescent state while running in userspace. This
> > way we can shut down the tick that is usually needed on each
> > CPU for the needs of RCU.
> 
> Very awesome.  I've wanted to see this change for a long time.  Thanks!

I am a fan, also.  ;-)

[ . . . ]

> > @@ -503,6 +515,18 @@ void rcu_user_exit(void)
> >  	__rcu_idle_exit();
> >  }
> >  
> > +void rcu_user_exit_irq(void)
> > +{
> > +	unsigned long flags;
> > +	struct rcu_dynticks *rdtp;
> > +
> > +	local_irq_save(flags);
> > +	rdtp = &__get_cpu_var(rcu_dynticks);
> > +	WARN_ON_ONCE(rdtp->dynticks_nesting != 1);
> > +	rdtp->dynticks_nesting = (LLONG_MAX / 2) + 1;
> > +	local_irq_restore(flags);
> > +}
> > +
> 
> Any chance that either of these two needs a memory barrier of some kind,
> to prevent leakage of operations from between them?  Or can you count on
> no RCU-protected operations occurring during (or leaking into) the
> extended quiescent state?

There is no need for a memory barrier on rdtp->dynticks_nesting because
it is used (aside from state dumping) only by the local CPU.  In contrast,
changes to ->dynticks are visible to other CPUs, hence the memory barriers
around changes to ->dynticks.

Information flows within the CPU from ->dynticks_nesting to ->dynticks,
which is externally visible.

Frederic, given my hamhandedness on the first patch and given that you
mentioned its being less time critical, I will let you forward port
patches #3 and #4.  I have pushed the first two patches to -rcu, branch
rcu/dyntick.  I will be testing over the evening.

							Thanx, Paul

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