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:	Sat, 5 Jun 2010 00:13:18 +1000
From:	Nick Piggin <npiggin@...e.de>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Al Viro <viro@...IV.linux.org.uk>, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Frank Mayhar <fmayhar@...gle.com>,
	John Stultz <johnstul@...ibm.com>,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [patch 2/4] lglock: introduce special lglock and brlock spin
 locks

On Fri, Jun 04, 2010 at 09:56:03AM +0200, Eric Dumazet wrote:
> Le vendredi 04 juin 2010 à 16:43 +1000, Nick Piggin a écrit :
> > pièce jointe document texte brut (kernel-introduce-brlock.patch)
> > This patch introduces "local-global" locks (lglocks). These can be used to:
> > 
> > - Provide fast exclusive access to per-CPU data, with exclusive access to
> >   another CPU's data allowed but possibly subject to contention, and to provide
> >   very slow exclusive access to all per-CPU data.
> > - Or to provide very fast and scalable read serialisation, and to provide
> >   very slow exclusive serialisation of data (not necessarily per-CPU data).
> > 
> > Brlocks are also implemented as a short-hand notation for the latter use
> > case.
> > 
> > Thanks to Paul for local/global naming convention.
> > 
> > Cc: linux-kernel@...r.kernel.org
> > Cc: linux-fsdevel@...r.kernel.org
> > Cc: Al Viro <viro@...IV.linux.org.uk>
> > Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> > Cc: Frank Mayhar <fmayhar@...gle.com>,
> > Cc: John Stultz <johnstul@...ibm.com>
> > Cc: Andi Kleen <ak@...ux.intel.com>
> > Signed-off-by: Nick Piggin <npiggin@...e.de>
> > ---
> >  include/linux/lglock.h |  165 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 165 insertions(+)
> > 
> 
> IMHO some changes in Documentation/ would be needed

I wonder where, and what?

 
> > + void name##_global_lock(void) {					\
> > +	int i;								\
> > +	preempt_disable();						\
> > +	rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_);		\
> > +	for_each_online_cpu(i) {					\
> 
> for_each_possible_cpu()

Oh good spotting. brlock does not need this but lglock does if it
protects offline cpu data too. Maybe better to move file handles in
the event of hotplug.

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