From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Alessio Igor Bogani <abogani@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Avi Kivity <avi@redhat.com>, Chris Metcalf <cmetcalf@tilera.com>,
Christoph Lameter <cl@linux.com>,
Geoff Levand <geoff@infradead.org>,
Gilad Ben Yossef <gilad@benyossef.com>,
Hakan Akkan <hakanakkan@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Kevin Hilman <khilman@ti.com>,
Max Krasnyansky <maxk@qualcomm.com>,
Peter Zijlstra <peterz@infradead.org>,
Stephen Hemminger <shemminger@vyatta.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sven-Thorsten Dietrich <thebigcorporation@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/6] rcu: Settle config for userspace extended quiescent state
Date: Mon, 9 Jul 2012 19:42:02 +0200 [thread overview]
Message-ID: <20120709174200.GB8185@somewhere.redhat.com> (raw)
In-Reply-To: <20120706163129.GV2522@linux.vnet.ibm.com>
On Fri, Jul 06, 2012 at 09:31:29AM -0700, Paul E. McKenney wrote:
> On Fri, Jul 06, 2012 at 02:00:13PM +0200, Frederic Weisbecker wrote:
> > Create a new config option under the RCU menu that put
> > CPUs under RCU extended quiescent state (as in dynticks
> > idle mode) when they run in userspace. This require
> > some contribution from architectures to hook into kernel
> > and userspace boundaries.
> >
> > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> > Cc: Alessio Igor Bogani <abogani@kernel.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Avi Kivity <avi@redhat.com>
> > Cc: Chris Metcalf <cmetcalf@tilera.com>
> > Cc: Christoph Lameter <cl@linux.com>
> > Cc: Geoff Levand <geoff@infradead.org>
> > Cc: Gilad Ben Yossef <gilad@benyossef.com>
> > Cc: Hakan Akkan <hakanakkan@gmail.com>
> > Cc: H. Peter Anvin <hpa@zytor.com>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Josh Triplett <josh@joshtriplett.org>
> > Cc: Kevin Hilman <khilman@ti.com>
> > Cc: Max Krasnyansky <maxk@qualcomm.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Stephen Hemminger <shemminger@vyatta.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Sven-Thorsten Dietrich <thebigcorporation@gmail.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > ---
> > arch/Kconfig | 13 +++++++++++++
> > init/Kconfig | 10 ++++++++++
> > kernel/rcutree.c | 4 ++++
> > 3 files changed, 27 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index 8c3d957..c2e0ce4 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -274,4 +274,17 @@ config SECCOMP_FILTER
> >
> > See Documentation/prctl/seccomp_filter.txt for details.
> >
> > +config HAVE_RCU_USER_QS
> > + bool
> > + help
> > + Provide kernel entry/exit hooks necessary for userspace
> > + RCU extended quiescent state. Syscalls and exceptions
> > + low level handlers must be wrapped with a call to rcu_user_exit()
> > + on entry and rcu_user_enter() before resuming userspace. Irqs
> > + entry don't need to call rcu_user_exit() because their high level
> > + handlers are protected inside rcu_irq_enter/rcu_irq_exit() but
> > + preemption or signal handling on irq exit still need to be protected
> > + with a call to rcu_user_exit(). rcu_user_enter() must then be
> > + called back on irq exit when the preempted task is back on the CPU.
> > +
> > source "kernel/gcov/Kconfig"
> > diff --git a/init/Kconfig b/init/Kconfig
> > index d07dcf9..3a4af8f 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -441,6 +441,16 @@ config PREEMPT_RCU
> > This option enables preemptible-RCU code that is common between
> > the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
> >
> > +config RCU_USER_QS
> > + bool "Consider userspace as in RCU extended quiescent state"
> > + depends on HAVE_RCU_USER_QS && SMP
>
> OK, I'll bite... Why the "SMP"? RCU could make good use of knowing
> about user-mode executing even in UP kernels.
Because Tiny RCU doesn't implement rcu_user_enter()/exit yet. And it
doesn't need it for now.
To better express the constraint I should probably have used:
depends on TREE_RCU || TREE_PREEMPT_RCU
next prev parent reply other threads:[~2012-07-09 17:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 12:00 [RFC PATCH 0/6] rcu: Userspace RCU extended quiescent state Frederic Weisbecker
2012-07-06 12:00 ` [PATCH 1/6] rcu: Settle config for userspace " Frederic Weisbecker
2012-07-06 16:31 ` Paul E. McKenney
2012-07-09 17:42 ` Frederic Weisbecker [this message]
2012-07-06 12:00 ` [PATCH 2/6] rcu: Allow rcu_user_enter()/exit() to nest Frederic Weisbecker
2012-07-06 16:27 ` Paul E. McKenney
2012-07-09 17:39 ` Frederic Weisbecker
2012-07-08 15:54 ` Avi Kivity
2012-07-09 17:45 ` Frederic Weisbecker
2012-07-06 12:00 ` [PATCH 3/6] rcu: Exit RCU extended QS on preemption in irq exit Frederic Weisbecker
2012-07-06 12:00 ` [PATCH 4/6] x86: Use the new schedule_user API on user preemption Frederic Weisbecker
2012-07-06 12:00 ` [PATCH 5/6] x86: Kernel entry/exit hooks for RCU Frederic Weisbecker
2012-07-06 12:00 ` [PATCH 6/6] x86: Exit RCU extended QS on notify resume Frederic Weisbecker
2012-07-06 16:33 ` Paul E. McKenney
2012-07-06 20:43 ` Josh Triplett
2012-07-08 21:17 ` Paul E. McKenney
2012-07-10 9:18 ` Frederic Weisbecker
2012-07-09 17:43 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120709174200.GB8185@somewhere.redhat.com \
--to=fweisbec@gmail.com \
--cc=abogani@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=cl@linux.com \
--cc=cmetcalf@tilera.com \
--cc=geoff@infradead.org \
--cc=gilad@benyossef.com \
--cc=hakanakkan@gmail.com \
--cc=hpa@zytor.com \
--cc=josh@joshtriplett.org \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shemminger@vyatta.com \
--cc=tglx@linutronix.de \
--cc=thebigcorporation@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox