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:	Tue, 17 Mar 2015 10:55:33 -0700
From:	josh@...htriplett.org
To:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Nicholas Miell <nmiell@...cast.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...hat.com>,
	Alan Cox <gnomes@...rguk.ukuu.org.uk>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Howells <dhowells@...hat.com>
Subject: Re: [RFC PATCH] sys_membarrier(): system/process-wide memory
 barrier (x86) (v12)

On Tue, Mar 17, 2015 at 04:36:27PM +0000, Mathieu Desnoyers wrote:
> > > On Tue, Mar 17, 2015 at 01:45:25AM +0000, Mathieu Desnoyers wrote:
> [...]
> > > 
> > > > Would you see it as acceptable if we start by implementing
> > > > only the non-expedited sys_membarrier() ?
> > > 
> > > Sure.
> > > 
> > > > Then we can add
> > > > the expedited-private implementation after rq->curr becomes
> > > > available through RCU.
> > > 
> > > Yeah, or not at all; I'm still trying to get Paul to remove the
> > > expedited nonsense from the kernel RCU bits; and now you want it in
> > > userspace too :/
> > 
> > The non-expedited case makes sense when we batch RCU work
> > with call_rcu. However, some users require to use synchronize_rcu()
> > directly after modifying their data structure. Therefore, the
> > latency associated with sys_membarrier() then becomes important,
> > hence the interest for an expedited scheme.
> > 
> > I agree that we should try to find a way to implement it with
> > low disturbance on the CPU's rq locks. I'd be certainly
> > OK with starting with just the non-expedited scheme, and add
> > the expedited scheme later on. This is why we have the flags
> > anyway.
> 
> Paul, I'm currently reworking the patch to keep only the
> non-expedited scheme. I don't need to touch the scheduler
> internals anymore, so should I move the sys_membarrier
> system call implementation into kernel/rcu/update.c ?

If you don't need access to scheduler internals, I'd suggest putting it
in its own file (something like kernel/membarrier.c), so that you can
use obj-$(CONFIG_MEMBARRIER) in a Makefile to enable/disable it rather
than an #ifdef in a .c file.

- 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