[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150318144147.GA5312@linux.vnet.ibm.com>
Date: Wed, 18 Mar 2015 07:41:48 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: josh@...htriplett.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>,
Peter Zijlstra <peterz@...radead.org>,
David Howells <dhowells@...hat.com>
Subject: Re: [RFC PATCH v13] sys_membarrier(): system/process-wide memory
barrier (x86)
On Tue, Mar 17, 2015 at 07:27:15PM +0000, Mathieu Desnoyers wrote:
> ----- Original Message -----
> > ----- Original Message -----
> > > On Tue, Mar 17, 2015 at 01:22:02PM -0400, Mathieu Desnoyers wrote:
> > > > --- a/init/Kconfig
> > > > +++ b/init/Kconfig
> > > > @@ -1568,6 +1568,15 @@ config PCI_QUIRKS
> > > > bugs/quirks. Disable this only if your target machine is
> > > > unaffected by PCI quirks.
> > > >
> > > > +config MEMBARRIER
> > > > + bool "Enable membarrier() system call" if EXPERT
> > > > + default y
> > > > + help
> > > > + Enable the membarrier() system call that allows issuing
> > > > + memory barriers across cores.
> > >
> > > Nit: CPUs, not cores. Nothing here is specific to
> > > packages/cores/threads.
> >
> > Fixed.
> >
> > >
> > > > --- a/kernel/rcu/update.c
> > > > +++ b/kernel/rcu/update.c
> > > > @@ -49,6 +49,8 @@
> > > > #include <linux/module.h>
> > > > #include <linux/kthread.h>
> > > > #include <linux/tick.h>
> > > > +#include <linux/syscalls.h>
> > > > +#include <linux/membarrier.h>
> > > >
> > > > #define CREATE_TRACE_POINTS
> > > >
> > > > @@ -775,3 +777,73 @@ late_initcall(rcu_verify_early_boot_tests);
> > > > #else
> > > > void rcu_early_boot_tests(void) {}
> > > > #endif /* CONFIG_PROVE_RCU */
> > > > +
> > > > +#ifdef CONFIG_MEMBARRIER
> > >
> > > As mentioned in my previous mail, please consider moving this to its own
> > > file, if it doesn't use any of the internals of kernel/rcu/update.c
> > > (which I don't think it does). That then means you can enable/disable
> > > the entire file in the Makefile rather than using an #ifdef in the .c
> > > file.
> >
> > Will do, thanks!
>
> I'm adding include/uapi/linux/membarrier.h and kernel/membarrier.c,
> how should I add them to the MAINTAINERS file ?
I suggest adding them as their own entry, with yourself as maintainer.
I would be willing to be co-maintainer, and perhaps some of the others
in this thread would also be willing.
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