All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2
@ 2012-07-11 18:26 Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 01/11] rcu: Settle config for userspace extended quiescent state Frederic Weisbecker
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Hi,

There are significant changes this time. I reverted back to using
a TIF flag to hook on syscalls slow path and put the hooks on
high level exception handlers instead of low level ones.

It makes the code more portable between x86-32 and x86-64, it
makes the hooks clearer and easier to review and the overhead
is lowered in the off-case. This can be even better if we use
jump labels later.

Thanks.

git://github.com/fweisbec/linux-dynticks.git
	rcu/user-2

Frederic Weisbecker (11):
  rcu: Settle config for userspace extended quiescent state
  rcu: Allow rcu_user_enter()/exit() to nest
  rcu: Ignore userspace extended quiescent state by default
  rcu: Switch task's syscall hooks on context switch
  x86: Syscall hooks for userspace RCU extended QS
  x86: Exception hooks for userspace RCU extended QS
  rcu: Exit RCU extended QS on kernel preemption after irq/exception
  rcu: Exit RCU extended QS on user preemption
  x86: Use the new schedule_user API on userspace preemption
  x86: Exit RCU extended QS on notify resume
  rcu: Userspace RCU extended QS selftest

 arch/Kconfig                       |   10 ++++++
 arch/um/drivers/mconsole_kern.c    |    2 +-
 arch/x86/Kconfig                   |    1 +
 arch/x86/include/asm/rcu.h         |   20 +++++++++++
 arch/x86/include/asm/thread_info.h |   10 ++++--
 arch/x86/kernel/entry_64.S         |    8 ++--
 arch/x86/kernel/ptrace.c           |    5 +++
 arch/x86/kernel/signal.c           |    4 ++
 arch/x86/kernel/traps.c            |   30 ++++++++++++----
 arch/x86/mm/fault.c                |   13 ++++++-
 include/linux/rcupdate.h           |   10 ++++++
 include/linux/sched.h              |   20 ++++++-----
 init/Kconfig                       |   18 ++++++++++
 kernel/rcutree.c                   |   64 +++++++++++++++++++++++++++++++-----
 kernel/rcutree.h                   |    4 ++
 kernel/sched/core.c                |   10 +++++-
 16 files changed, 192 insertions(+), 37 deletions(-)
 create mode 100644 arch/x86/include/asm/rcu.h

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 01/11] rcu: Settle config for userspace extended quiescent state
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 02/11] rcu: Allow rcu_user_enter()/exit() to nest Frederic Weisbecker
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

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             |   10 ++++++++++
 include/linux/rcupdate.h |    8 ++++++++
 init/Kconfig             |   10 ++++++++++
 kernel/rcutree.c         |    5 ++++-
 4 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 8c3d957..1c7c9be 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -274,4 +274,14 @@ 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 need to be wrapped inside
+	  rcu_user_exit()-rcu_user_enter() through the slow path using
+	  TIF_NOHZ flag. Exceptions handlers must be wrapped as well. Irqs
+	  are already protected inside rcu_irq_enter/rcu_irq_exit() but
+	  preemption or signal handling on irq exit still need to be protected.
+
 source "kernel/gcov/Kconfig"
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 148f381..a72f25e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -192,10 +192,18 @@ extern void rcu_idle_enter(void);
 extern void rcu_idle_exit(void);
 extern void rcu_irq_enter(void);
 extern void rcu_irq_exit(void);
+
+#ifdef CONFIG_RCU_USER_QS
 extern void rcu_user_enter(void);
 extern void rcu_user_exit(void);
 extern void rcu_user_enter_irq(void);
 extern void rcu_user_exit_irq(void);
+#else
+static inline void rcu_user_enter(void) { }
+static inline void rcu_user_exit(void) { }
+#endif /* CONFIG_RCU_USER_QS */
+
+
 extern void exit_rcu(void);
 
 /**
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
+	help
+	  This option sets hooks on kernel / userspace boundaries and
+	  puts RCU in extended quiescent state when the CPU runs in
+	  userspace. It means that when a CPU runs in userspace, it is
+	  excluded from the global RCU state machine and thus doesn't
+	  to keep the timer tick on for RCU.
+
 config RCU_FANOUT
 	int "Tree-based hierarchical RCU fanout value"
 	range 2 64 if 64BIT
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 5541a07..efa5983 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -423,6 +423,7 @@ void rcu_idle_enter(void)
 }
 EXPORT_SYMBOL_GPL(rcu_idle_enter);
 
+#ifdef CONFIG_RCU_USER_QS
 /**
  * rcu_user_enter - inform RCU that we are resuming userspace.
  *
@@ -437,7 +438,6 @@ void rcu_user_enter(void)
 }
 EXPORT_SYMBOL_GPL(rcu_user_enter);
 
-
 /**
  * rcu_user_enter_irq - inform RCU that we are going to resume userspace
  * after the current irq returns.
@@ -458,6 +458,7 @@ void rcu_user_enter_irq(void)
 	rdtp->dynticks_nesting = 1;
 	local_irq_restore(flags);
 }
+#endif
 
 /**
  * rcu_irq_exit - inform RCU that current CPU is exiting irq towards idle
@@ -561,6 +562,7 @@ void rcu_idle_exit(void)
 }
 EXPORT_SYMBOL_GPL(rcu_idle_exit);
 
+#ifdef CONFIG_RCU_USER_QS
 /**
  * rcu_user_exit - inform RCU that we are exiting userspace.
  *
@@ -594,6 +596,7 @@ void rcu_user_exit_irq(void)
 	rdtp->dynticks_nesting += DYNTICK_TASK_EXIT_IDLE;
 	local_irq_restore(flags);
 }
+#endif
 
 /**
  * rcu_irq_enter - inform RCU that current CPU is entering irq away from idle
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 02/11] rcu: Allow rcu_user_enter()/exit() to nest
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 01/11] rcu: Settle config for userspace extended quiescent state Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 03/11] rcu: Ignore userspace extended quiescent state by default Frederic Weisbecker
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Allow calls to rcu_user_enter() even if we are already
in userspace (as seen by RCU) and allow calls to rcu_user_exit()
even if we are already in the kernel.

This makes the APIs more flexible to be called from architectures.
Exception entries for example won't need to know if they come from
userspace before calling rcu_user_exit().

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>
---
 kernel/rcutree.c |   41 +++++++++++++++++++++++++++++++++--------
 kernel/rcutree.h |    3 +++
 2 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index efa5983..d5df618 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -389,11 +389,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
  */
 static void rcu_eqs_enter(bool user)
 {
-	unsigned long flags;
 	long long oldval;
 	struct rcu_dynticks *rdtp;
 
-	local_irq_save(flags);
 	rdtp = &__get_cpu_var(rcu_dynticks);
 	oldval = rdtp->dynticks_nesting;
 	WARN_ON_ONCE((oldval & DYNTICK_TASK_NEST_MASK) == 0);
@@ -402,7 +400,6 @@ static void rcu_eqs_enter(bool user)
 	else
 		rdtp->dynticks_nesting -= DYNTICK_TASK_NEST_VALUE;
 	rcu_eqs_enter_common(rdtp, oldval, user);
-	local_irq_restore(flags);
 }
 
 /**
@@ -419,7 +416,11 @@ static void rcu_eqs_enter(bool user)
  */
 void rcu_idle_enter(void)
 {
+	unsigned long flags;
+
+	local_irq_save(flags);
 	rcu_eqs_enter(0);
+	local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(rcu_idle_enter);
 
@@ -434,7 +435,18 @@ EXPORT_SYMBOL_GPL(rcu_idle_enter);
  */
 void rcu_user_enter(void)
 {
-	rcu_eqs_enter(1);
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	WARN_ON_ONCE(!current->mm);
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	if (!rdtp->in_user) {
+		rdtp->in_user = true;
+		rcu_eqs_enter(1);
+	}
+	local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(rcu_user_enter);
 
@@ -529,11 +541,9 @@ static void rcu_eqs_exit_common(struct rcu_dynticks *rdtp, long long oldval,
  */
 static void rcu_eqs_exit(bool user)
 {
-	unsigned long flags;
 	struct rcu_dynticks *rdtp;
 	long long oldval;
 
-	local_irq_save(flags);
 	rdtp = &__get_cpu_var(rcu_dynticks);
 	oldval = rdtp->dynticks_nesting;
 	WARN_ON_ONCE(oldval < 0);
@@ -542,7 +552,6 @@ static void rcu_eqs_exit(bool user)
 	else
 		rdtp->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
 	rcu_eqs_exit_common(rdtp, oldval, user);
-	local_irq_restore(flags);
 }
 
 /**
@@ -558,7 +567,11 @@ static void rcu_eqs_exit(bool user)
  */
 void rcu_idle_exit(void)
 {
+	unsigned long flags;
+
+	local_irq_save(flags);
 	rcu_eqs_exit(0);
+	local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(rcu_idle_exit);
 
@@ -571,7 +584,16 @@ EXPORT_SYMBOL_GPL(rcu_idle_exit);
  */
 void rcu_user_exit(void)
 {
-	rcu_eqs_exit(1);
+	unsigned long flags;
+	struct rcu_dynticks *rdtp;
+
+	local_irq_save(flags);
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	if (rdtp->in_user) {
+		rdtp->in_user = false;
+		rcu_eqs_exit(1);
+	}
+	local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(rcu_user_exit);
 
@@ -2660,6 +2682,9 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
 	rdp->dynticks = &per_cpu(rcu_dynticks, cpu);
 	WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_EXIT_IDLE);
 	WARN_ON_ONCE(atomic_read(&rdp->dynticks->dynticks) != 1);
+#ifdef CONFIG_RCU_USER_QS
+	WARN_ON_ONCE(rdp->dynticks->in_user);
+#endif
 	rdp->cpu = cpu;
 	rdp->rsp = rsp;
 	raw_spin_unlock_irqrestore(&rnp->lock, flags);
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index cad96cb..4d82cb5 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -102,6 +102,9 @@ struct rcu_dynticks {
 				    /* idle-period nonlazy_posted snapshot. */
 	int tick_nohz_enabled_snap; /* Previously seen value from sysfs. */
 #endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
+#ifdef CONFIG_RCU_USER_QS
+	bool in_user;		    /* Is the CPU in userland from RCU POV? */
+#endif
 };
 
 /* RCU's kthread states for tracing. */
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 03/11] rcu: Ignore userspace extended quiescent state by default
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 01/11] rcu: Settle config for userspace extended quiescent state Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 02/11] rcu: Allow rcu_user_enter()/exit() to nest Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 04/11] rcu: Switch task's syscall hooks on context switch Frederic Weisbecker
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

By default we don't want to enter into RCU extended quiescent
state while in userspace because doing this produces some overhead
(eg: use of syscall slowpath). Set it off by default and ready to
run when some feature like adaptive tickless need it.

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>
---
 kernel/rcutree.c |    5 ++++-
 kernel/rcutree.h |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index d5df618..78b0c30 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -209,6 +209,9 @@ EXPORT_SYMBOL_GPL(rcu_note_context_switch);
 DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
 	.dynticks_nesting = DYNTICK_TASK_EXIT_IDLE,
 	.dynticks = ATOMIC_INIT(1),
+#ifdef CONFIG_RCU_USER_QS
+	.ignore_user_qs = true,
+#endif
 };
 
 static int blimit = 10;		/* Maximum callbacks per rcu_do_batch. */
@@ -442,7 +445,7 @@ void rcu_user_enter(void)
 
 	local_irq_save(flags);
 	rdtp = &__get_cpu_var(rcu_dynticks);
-	if (!rdtp->in_user) {
+	if (!rdtp->ignore_user_qs && !rdtp->in_user) {
 		rdtp->in_user = true;
 		rcu_eqs_enter(1);
 	}
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index 4d82cb5..55bcef1 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -103,6 +103,7 @@ struct rcu_dynticks {
 	int tick_nohz_enabled_snap; /* Previously seen value from sysfs. */
 #endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
 #ifdef CONFIG_RCU_USER_QS
+	bool ignore_user_qs;	    /* Treat userspace as extended QS or not */
 	bool in_user;		    /* Is the CPU in userland from RCU POV? */
 #endif
 };
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 04/11] rcu: Switch task's syscall hooks on context switch
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (2 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 03/11] rcu: Ignore userspace extended quiescent state by default Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 05/11] x86: Syscall hooks for userspace RCU extended QS Frederic Weisbecker
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Clear the syscalls hook of a task when it's scheduled out so that if
the task migrates, it doesn't run the syscall slow path on a CPU
that might not need it.

Also set the syscalls hook on the next task if needed.

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/um/drivers/mconsole_kern.c |    2 +-
 include/linux/rcupdate.h        |    2 ++
 include/linux/sched.h           |   20 +++++++++++---------
 kernel/rcutree.c                |   15 +++++++++++++++
 kernel/sched/core.c             |    2 +-
 5 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 88e466b..e61922d 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -705,7 +705,7 @@ static void stack_proc(void *arg)
 	struct task_struct *from = current, *to = arg;
 
 	to->thread.saved_task = from;
-	rcu_switch_from(from);
+	rcu_switch(from, to);
 	switch_to(from, to, from);
 }
 
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index a72f25e..1e57888 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -198,6 +198,8 @@ extern void rcu_user_enter(void);
 extern void rcu_user_exit(void);
 extern void rcu_user_enter_irq(void);
 extern void rcu_user_exit_irq(void);
+extern void rcu_user_hooks_switch(struct task_struct *prev,
+				  struct task_struct *next);
 #else
 static inline void rcu_user_enter(void) { }
 static inline void rcu_user_exit(void) { }
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4059c0f..e17fcd0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1871,23 +1871,25 @@ static inline void rcu_copy_process(struct task_struct *p)
 	INIT_LIST_HEAD(&p->rcu_node_entry);
 }
 
-static inline void rcu_switch_from(struct task_struct *prev)
-{
-	if (prev->rcu_read_lock_nesting != 0)
-		rcu_preempt_note_context_switch();
-}
-
 #else
 
 static inline void rcu_copy_process(struct task_struct *p)
 {
 }
 
-static inline void rcu_switch_from(struct task_struct *prev)
-{
-}
+#endif
 
+static inline void rcu_switch(struct task_struct *prev,
+			      struct task_struct *next)
+{
+#ifdef CONFIG_PREEMPT_RCU
+	if (prev->rcu_read_lock_nesting != 0)
+		rcu_preempt_note_context_switch();
+#endif
+#ifdef CONFIG_RCU_USER_QS
+	rcu_user_hooks_switch(prev, next);
 #endif
+}
 
 #ifdef CONFIG_SMP
 extern void do_set_cpus_allowed(struct task_struct *p,
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 78b0c30..2d79308 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -720,6 +720,21 @@ int rcu_is_cpu_idle(void)
 }
 EXPORT_SYMBOL(rcu_is_cpu_idle);
 
+#ifdef CONFIG_RCU_USER_QS
+void rcu_user_hooks_switch(struct task_struct *prev,
+			   struct task_struct *next)
+{
+	struct rcu_dynticks *rdtp;
+
+	/* Interrupts are disabled in context switch */
+	rdtp = &__get_cpu_var(rcu_dynticks);
+	if (!rdtp->ignore_user_qs) {
+		clear_tsk_thread_flag(prev, TIF_NOHZ);
+		set_tsk_thread_flag(next, TIF_NOHZ);
+	}
+}
+#endif
+
 #if defined(CONFIG_PROVE_RCU) && defined(CONFIG_HOTPLUG_CPU)
 
 /*
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d5594a4..fa61d8a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2081,7 +2081,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
 #endif
 
 	/* Here we just switch the register state and the stack. */
-	rcu_switch_from(prev);
+	rcu_switch(prev, next);
 	switch_to(prev, next, prev);
 
 	barrier();
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/11] x86: Syscall hooks for userspace RCU extended QS
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (3 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 04/11] rcu: Switch task's syscall hooks on context switch Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 06/11] x86: Exception " Frederic Weisbecker
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Add syscall slow path hooks to notify syscall entry
and exit on CPUs that want to support userspace RCU
extended quiescent state.

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/x86/include/asm/thread_info.h |   10 +++++++---
 arch/x86/kernel/ptrace.c           |    5 +++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index 89f794f..c535d84 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -89,6 +89,7 @@ struct thread_info {
 #define TIF_NOTSC		16	/* TSC is not accessible in userland */
 #define TIF_IA32		17	/* IA32 compatibility process */
 #define TIF_FORK		18	/* ret_from_fork */
+#define TIF_NOHZ		19	/* in adaptive nohz mode */
 #define TIF_MEMDIE		20	/* is terminating due to OOM killer */
 #define TIF_DEBUG		21	/* uses debug registers */
 #define TIF_IO_BITMAP		22	/* uses I/O bitmap */
@@ -114,6 +115,7 @@ struct thread_info {
 #define _TIF_NOTSC		(1 << TIF_NOTSC)
 #define _TIF_IA32		(1 << TIF_IA32)
 #define _TIF_FORK		(1 << TIF_FORK)
+#define _TIF_NOHZ		(1 << TIF_NOHZ)
 #define _TIF_DEBUG		(1 << TIF_DEBUG)
 #define _TIF_IO_BITMAP		(1 << TIF_IO_BITMAP)
 #define _TIF_FORCED_TF		(1 << TIF_FORCED_TF)
@@ -126,12 +128,13 @@ struct thread_info {
 /* work to do in syscall_trace_enter() */
 #define _TIF_WORK_SYSCALL_ENTRY	\
 	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | _TIF_SYSCALL_AUDIT |	\
-	 _TIF_SECCOMP | _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT)
+	 _TIF_SECCOMP | _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT |	\
+	 _TIF_NOHZ)
 
 /* work to do in syscall_trace_leave() */
 #define _TIF_WORK_SYSCALL_EXIT	\
 	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP |	\
-	 _TIF_SYSCALL_TRACEPOINT)
+	 _TIF_SYSCALL_TRACEPOINT | _TIF_NOHZ)
 
 /* work to do on interrupt/exception return */
 #define _TIF_WORK_MASK							\
@@ -141,7 +144,8 @@ struct thread_info {
 
 /* work to do on any return to user space */
 #define _TIF_ALLWORK_MASK						\
-	((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT)
+	((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT |	\
+	_TIF_NOHZ)
 
 /* Only used for 64 bit */
 #define _TIF_DO_NOTIFY_MASK						\
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index c4c6a5c..9f94f8e 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -21,6 +21,7 @@
 #include <linux/signal.h>
 #include <linux/perf_event.h>
 #include <linux/hw_breakpoint.h>
+#include <linux/rcupdate.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -1463,6 +1464,8 @@ long syscall_trace_enter(struct pt_regs *regs)
 {
 	long ret = 0;
 
+	rcu_user_exit();
+
 	/*
 	 * If we stepped into a sysenter/syscall insn, it trapped in
 	 * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP.
@@ -1526,4 +1529,6 @@ void syscall_trace_leave(struct pt_regs *regs)
 			!test_thread_flag(TIF_SYSCALL_EMU);
 	if (step || test_thread_flag(TIF_SYSCALL_TRACE))
 		tracehook_report_syscall_exit(regs, step);
+
+	rcu_user_enter();
 }
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/11] x86: Exception hooks for userspace RCU extended QS
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (4 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 05/11] x86: Syscall hooks for userspace RCU extended QS Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 07/11] rcu: Exit RCU extended QS on kernel preemption after irq/exception Frederic Weisbecker
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Add necessary hooks to x86 exception for userspace
RCU extended quiescent state support.

This includes traps, page fault, debug exceptions, etc...

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/x86/include/asm/rcu.h |   20 ++++++++++++++++++++
 arch/x86/kernel/traps.c    |   30 ++++++++++++++++++++++--------
 arch/x86/mm/fault.c        |   13 +++++++++++--
 3 files changed, 53 insertions(+), 10 deletions(-)
 create mode 100644 arch/x86/include/asm/rcu.h

diff --git a/arch/x86/include/asm/rcu.h b/arch/x86/include/asm/rcu.h
new file mode 100644
index 0000000..439815b
--- /dev/null
+++ b/arch/x86/include/asm/rcu.h
@@ -0,0 +1,20 @@
+#ifndef _ASM_X86_RCU_H
+#define _ASM_X86_RCU_H
+
+#include <linux/rcupdate.h>
+#include <asm/ptrace.h>
+
+static inline void exception_enter(struct pt_regs *regs)
+{
+	rcu_user_exit();
+}
+
+static inline void exception_exit(struct pt_regs *regs)
+{
+#ifdef CONFIG_RCU_USER_QS
+	if (user_mode(regs))
+		rcu_user_enter();
+#endif
+}
+
+#endif
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 05b31d9..9b8195b 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -52,6 +52,7 @@
 #include <asm/i387.h>
 #include <asm/fpu-internal.h>
 #include <asm/mce.h>
+#include <asm/rcu.h>
 
 #include <asm/mach_traps.h>
 
@@ -178,11 +179,15 @@ vm86_trap:
 #define DO_ERROR(trapnr, signr, str, name)				\
 dotraplinkage void do_##name(struct pt_regs *regs, long error_code)	\
 {									\
-	if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr)	\
-							== NOTIFY_STOP)	\
+	exception_enter(regs);						\
+	if (notify_die(DIE_TRAP, str, regs, error_code,			\
+			trapnr, signr) == NOTIFY_STOP) {		\
+		exception_exit(regs);					\
 		return;							\
+	}								\
 	conditional_sti(regs);						\
 	do_trap(trapnr, signr, str, regs, error_code, NULL);		\
+	exception_exit(regs);						\
 }
 
 #define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr)		\
@@ -193,11 +198,15 @@ dotraplinkage void do_##name(struct pt_regs *regs, long error_code)	\
 	info.si_errno = 0;						\
 	info.si_code = sicode;						\
 	info.si_addr = (void __user *)siaddr;				\
-	if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr)	\
-							== NOTIFY_STOP)	\
+	exception_enter(regs);						\
+	if (notify_die(DIE_TRAP, str, regs, error_code,			\
+			trapnr, signr) == NOTIFY_STOP) {		\
+		exception_exit(regs);					\
 		return;							\
+	}								\
 	conditional_sti(regs);						\
 	do_trap(trapnr, signr, str, regs, error_code, &info);		\
+	exception_exit(regs);						\
 }
 
 DO_ERROR_INFO(X86_TRAP_DE, SIGFPE, "divide error", divide_error, FPE_INTDIV,
@@ -311,6 +320,7 @@ dotraplinkage void __kprobes notrace do_int3(struct pt_regs *regs, long error_co
 	    ftrace_int3_handler(regs))
 		return;
 #endif
+	exception_enter(regs);
 #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
 	if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
 				SIGTRAP) == NOTIFY_STOP)
@@ -330,6 +340,7 @@ dotraplinkage void __kprobes notrace do_int3(struct pt_regs *regs, long error_co
 	do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL);
 	preempt_conditional_cli(regs);
 	debug_stack_usage_dec();
+	exception_exit(regs);
 }
 
 #ifdef CONFIG_X86_64
@@ -390,6 +401,8 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 	unsigned long dr6;
 	int si_code;
 
+	exception_enter(regs);
+
 	get_debugreg(dr6, 6);
 
 	/* Filter out all the reserved bits which are preset to 1 */
@@ -405,7 +418,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 
 	/* Catch kmemcheck conditions first of all! */
 	if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
-		return;
+		goto exit;
 
 	/* DR6 may or may not be cleared by the CPU */
 	set_debugreg(0, 6);
@@ -420,7 +433,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 
 	if (notify_die(DIE_DEBUG, "debug", regs, PTR_ERR(&dr6), error_code,
 							SIGTRAP) == NOTIFY_STOP)
-		return;
+		goto exit;
 
 	/*
 	 * Let others (NMI) know that the debug stack is in use
@@ -436,7 +449,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 					X86_TRAP_DB);
 		preempt_conditional_cli(regs);
 		debug_stack_usage_dec();
-		return;
+		goto exit;
 	}
 
 	/*
@@ -457,7 +470,8 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 	preempt_conditional_cli(regs);
 	debug_stack_usage_dec();
 
-	return;
+exit:
+	exception_exit(regs);
 }
 
 /*
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 76dcd9d..7dde46d 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -18,6 +18,7 @@
 #include <asm/pgalloc.h>		/* pgd_*(), ...			*/
 #include <asm/kmemcheck.h>		/* kmemcheck_*(), ...		*/
 #include <asm/fixmap.h>			/* VSYSCALL_START		*/
+#include <asm/rcu.h>			/* exception_enter(), ...	*/
 
 /*
  * Page fault error code bits:
@@ -1000,8 +1001,8 @@ static int fault_in_kernel_space(unsigned long address)
  * and the problem, and then passes it off to one of the appropriate
  * routines.
  */
-dotraplinkage void __kprobes
-do_page_fault(struct pt_regs *regs, unsigned long error_code)
+static void __kprobes
+__do_page_fault(struct pt_regs *regs, unsigned long error_code)
 {
 	struct vm_area_struct *vma;
 	struct task_struct *tsk;
@@ -1209,3 +1210,11 @@ good_area:
 
 	up_read(&mm->mmap_sem);
 }
+
+dotraplinkage void __kprobes
+do_page_fault(struct pt_regs *regs, unsigned long error_code)
+{
+	exception_enter(regs);
+	__do_page_fault(regs, error_code);
+	exception_exit(regs);
+}
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 07/11] rcu: Exit RCU extended QS on kernel preemption after irq/exception
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (5 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 06/11] x86: Exception " Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 08/11] rcu: Exit RCU extended QS on user preemption Frederic Weisbecker
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

When an exception or an irq exits, and we are going to resume into
interrupted kernel code, the low level architecture code calls
preempt_schedule_irq() if there is a need to reschedule.

If the interrupt/exception occured between a call to rcu_user_enter()
(from syscall exit, exception exit, do_notify_resume exit, ...) and
a real resume to userspace (iret,...), preempt_schedule_irq() can be
called whereas RCU thinks we are in userspace. But preempt_schedule_irq()
is going to run kernel code and may be some RCU read side critical
section. We must exit the userspace extended quiescent state before
we call it.

To solve this, just call rcu_user_exit() in the beginning of
preempt_schedule_irq().

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>
---
 kernel/sched/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fa61d8a..1e0fa5b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3433,6 +3433,7 @@ asmlinkage void __sched preempt_schedule_irq(void)
 	/* Catch callers which need to be fixed */
 	BUG_ON(ti->preempt_count || !irqs_disabled());
 
+	rcu_user_exit();
 	do {
 		add_preempt_count(PREEMPT_ACTIVE);
 		local_irq_enable();
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 08/11] rcu: Exit RCU extended QS on user preemption
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (6 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 07/11] rcu: Exit RCU extended QS on kernel preemption after irq/exception Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 09/11] x86: Use the new schedule_user API on userspace preemption Frederic Weisbecker
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

When exceptions or irq are about to resume userspace, if
the task needs to be rescheduled, the arch low level code
calls schedule() directly.

At that time we may be in extended quiescent state from RCU
POV: the exception is not anymore protected inside
rcu_user_exit() - rcu_user_enter() and the irq has called
rcu_irq_exit() already.

Create a new API schedule_user() that calls schedule() inside
rcu_user_exit()-rcu_user_enter() in order to protect it. Archs
will need to rely on it now to implement user preemption safely.

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>
---
 kernel/sched/core.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1e0fa5b..a37619a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3332,6 +3332,13 @@ asmlinkage void __sched schedule(void)
 }
 EXPORT_SYMBOL(schedule);
 
+asmlinkage void __sched schedule_user(void)
+{
+	rcu_user_exit();
+	schedule();
+	rcu_user_enter();
+}
+
 /**
  * schedule_preempt_disabled - called with preemption disabled
  *
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/11] x86: Use the new schedule_user API on userspace preemption
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (7 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 08/11] rcu: Exit RCU extended QS on user preemption Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 10/11] x86: Exit RCU extended QS on notify resume Frederic Weisbecker
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

This way we can exit the RCU extended quiescent state before
we schedule a new task from irq/exception exit.

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/x86/kernel/entry_64.S |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 7d65133..e97d42d 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -565,7 +565,7 @@ sysret_careful:
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_NONE)
 	pushq_cfi %rdi
-	call schedule
+	call schedule_user
 	popq_cfi %rdi
 	jmp sysret_check
 
@@ -678,7 +678,7 @@ int_careful:
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_NONE)
 	pushq_cfi %rdi
-	call schedule
+	call schedule_user
 	popq_cfi %rdi
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
@@ -974,7 +974,7 @@ retint_careful:
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_NONE)
 	pushq_cfi %rdi
-	call  schedule
+	call  schedule_user
 	popq_cfi %rdi
 	GET_THREAD_INFO(%rcx)
 	DISABLE_INTERRUPTS(CLBR_NONE)
@@ -1467,7 +1467,7 @@ paranoid_userspace:
 paranoid_schedule:
 	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS(CLBR_ANY)
-	call schedule
+	call schedule_user
 	DISABLE_INTERRUPTS(CLBR_ANY)
 	TRACE_IRQS_OFF
 	jmp paranoid_userspace
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 10/11] x86: Exit RCU extended QS on notify resume
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (8 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 09/11] x86: Use the new schedule_user API on userspace preemption Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-11 18:26 ` [PATCH 11/11] rcu: Userspace RCU extended QS selftest Frederic Weisbecker
  2012-07-16 22:15 ` [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Paul E. McKenney
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

do_notify_resume() may be called on irq or exception
exit. But at that time the exception has already called
rcu_user_enter() and the irq has already called rcu_irq_exit().

Since it can use RCU read side critical section, we must call
rcu_user_exit() before doing anything there. Then we must call
back rcu_user_enter() after this function because we know we are
going to userspace from there.

This complete support for userspace RCU extended quiescent state
in x86-64.

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/x86/Kconfig         |    1 +
 arch/x86/kernel/signal.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c70684f..38dfcc2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -95,6 +95,7 @@ config X86
 	select KTIME_SCALAR if X86_32
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
+	select HAVE_RCU_USER_QS if X86_64
 
 config INSTRUCTION_DECODER
 	def_bool (KPROBES || PERF_EVENTS || UPROBES)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 21af737..5cc2579 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -776,6 +776,8 @@ static void do_signal(struct pt_regs *regs)
 void
 do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
 {
+	rcu_user_exit();
+
 #ifdef CONFIG_X86_MCE
 	/* notify userspace of pending MCEs */
 	if (thread_info_flags & _TIF_MCE_NOTIFY)
@@ -801,6 +803,8 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
 #ifdef CONFIG_X86_32
 	clear_thread_flag(TIF_IRET);
 #endif /* CONFIG_X86_32 */
+
+	rcu_user_enter();
 }
 
 void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 11/11] rcu: Userspace RCU extended QS selftest
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (9 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 10/11] x86: Exit RCU extended QS on notify resume Frederic Weisbecker
@ 2012-07-11 18:26 ` Frederic Weisbecker
  2012-07-16 22:15 ` [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Paul E. McKenney
  11 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-11 18:26 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Frederic Weisbecker, Alessio Igor Bogani, Andrew Morton,
	Avi Kivity, Chris Metcalf, Christoph Lameter, Geoff Levand,
	Gilad Ben Yossef, Hakan Akkan, H. Peter Anvin, Ingo Molnar,
	Josh Triplett, Kevin Hilman, Max Krasnyansky, Peter Zijlstra,
	Stephen Hemminger, Steven Rostedt, Sven-Thorsten Dietrich,
	Thomas Gleixner

Provide a config option that enables the userspace
RCU extended quiescent state on every CPUs by default.

This is for testing purpose.

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>
---
 init/Kconfig     |    8 ++++++++
 kernel/rcutree.c |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 3a4af8f..7d1db2e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -451,6 +451,14 @@ config RCU_USER_QS
 	  excluded from the global RCU state machine and thus doesn't
 	  to keep the timer tick on for RCU.
 
+config RCU_USER_QS_FORCE
+	bool "Force userspace extended QS by default"
+	depends on RCU_USER_QS
+	help
+	  Set the hooks in user/kernel boundaries by default in order to
+	  test this feature that treats userspace as an extended quiescent
+	  state until we have a real user like a full adaptive nohz option.
+
 config RCU_FANOUT
 	int "Tree-based hierarchical RCU fanout value"
 	range 2 64 if 64BIT
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 2d79308..9427aba 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -209,7 +209,7 @@ EXPORT_SYMBOL_GPL(rcu_note_context_switch);
 DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
 	.dynticks_nesting = DYNTICK_TASK_EXIT_IDLE,
 	.dynticks = ATOMIC_INIT(1),
-#ifdef CONFIG_RCU_USER_QS
+#if defined(CONFIG_RCU_USER_QS) && !defined(CONFIG_RCU_USER_QS_FORCE)
 	.ignore_user_qs = true,
 #endif
 };
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2
  2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
                   ` (10 preceding siblings ...)
  2012-07-11 18:26 ` [PATCH 11/11] rcu: Userspace RCU extended QS selftest Frederic Weisbecker
@ 2012-07-16 22:15 ` Paul E. McKenney
  2012-07-16 22:57   ` Frederic Weisbecker
  11 siblings, 1 reply; 14+ messages in thread
From: Paul E. McKenney @ 2012-07-16 22:15 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: LKML, Alessio Igor Bogani, Andrew Morton, Avi Kivity,
	Chris Metcalf, Christoph Lameter, Geoff Levand, Gilad Ben Yossef,
	Hakan Akkan, H. Peter Anvin, Ingo Molnar, Josh Triplett,
	Kevin Hilman, Max Krasnyansky, Peter Zijlstra, Stephen Hemminger,
	Steven Rostedt, Sven-Thorsten Dietrich, Thomas Gleixner

On Wed, Jul 11, 2012 at 08:26:29PM +0200, Frederic Weisbecker wrote:
> Hi,
> 
> There are significant changes this time. I reverted back to using
> a TIF flag to hook on syscalls slow path and put the hooks on
> high level exception handlers instead of low level ones.
> 
> It makes the code more portable between x86-32 and x86-64, it
> makes the hooks clearer and easier to review and the overhead
> is lowered in the off-case. This can be even better if we use
> jump labels later.

Thank you, Frederic, I have queued these:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/idle

I had to rework patch 4 a bit to take into account that I dropped the
rcu_switch_from() patch, please check it to make sure that I didn't
rework it out of existence.

							Thanx, Paul

> Thanks.
> 
> git://github.com/fweisbec/linux-dynticks.git
> 	rcu/user-2
> 
> Frederic Weisbecker (11):
>   rcu: Settle config for userspace extended quiescent state
>   rcu: Allow rcu_user_enter()/exit() to nest
>   rcu: Ignore userspace extended quiescent state by default
>   rcu: Switch task's syscall hooks on context switch
>   x86: Syscall hooks for userspace RCU extended QS
>   x86: Exception hooks for userspace RCU extended QS
>   rcu: Exit RCU extended QS on kernel preemption after irq/exception
>   rcu: Exit RCU extended QS on user preemption
>   x86: Use the new schedule_user API on userspace preemption
>   x86: Exit RCU extended QS on notify resume
>   rcu: Userspace RCU extended QS selftest
> 
>  arch/Kconfig                       |   10 ++++++
>  arch/um/drivers/mconsole_kern.c    |    2 +-
>  arch/x86/Kconfig                   |    1 +
>  arch/x86/include/asm/rcu.h         |   20 +++++++++++
>  arch/x86/include/asm/thread_info.h |   10 ++++--
>  arch/x86/kernel/entry_64.S         |    8 ++--
>  arch/x86/kernel/ptrace.c           |    5 +++
>  arch/x86/kernel/signal.c           |    4 ++
>  arch/x86/kernel/traps.c            |   30 ++++++++++++----
>  arch/x86/mm/fault.c                |   13 ++++++-
>  include/linux/rcupdate.h           |   10 ++++++
>  include/linux/sched.h              |   20 ++++++-----
>  init/Kconfig                       |   18 ++++++++++
>  kernel/rcutree.c                   |   64 +++++++++++++++++++++++++++++++-----
>  kernel/rcutree.h                   |    4 ++
>  kernel/sched/core.c                |   10 +++++-
>  16 files changed, 192 insertions(+), 37 deletions(-)
>  create mode 100644 arch/x86/include/asm/rcu.h
> 
> -- 
> 1.7.5.4
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2
  2012-07-16 22:15 ` [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Paul E. McKenney
@ 2012-07-16 22:57   ` Frederic Weisbecker
  0 siblings, 0 replies; 14+ messages in thread
From: Frederic Weisbecker @ 2012-07-16 22:57 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: LKML, Alessio Igor Bogani, Andrew Morton, Avi Kivity,
	Chris Metcalf, Christoph Lameter, Geoff Levand, Gilad Ben Yossef,
	Hakan Akkan, H. Peter Anvin, Ingo Molnar, Josh Triplett,
	Kevin Hilman, Max Krasnyansky, Peter Zijlstra, Stephen Hemminger,
	Steven Rostedt, Sven-Thorsten Dietrich, Thomas Gleixner

On Mon, Jul 16, 2012 at 03:15:56PM -0700, Paul E. McKenney wrote:
> On Wed, Jul 11, 2012 at 08:26:29PM +0200, Frederic Weisbecker wrote:
> > Hi,
> > 
> > There are significant changes this time. I reverted back to using
> > a TIF flag to hook on syscalls slow path and put the hooks on
> > high level exception handlers instead of low level ones.
> > 
> > It makes the code more portable between x86-32 and x86-64, it
> > makes the hooks clearer and easier to review and the overhead
> > is lowered in the off-case. This can be even better if we use
> > jump labels later.
> 
> Thank you, Frederic, I have queued these:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/idle
> 
> I had to rework patch 4 a bit to take into account that I dropped the
> rcu_switch_from() patch, please check it to make sure that I didn't
> rework it out of existence.
> 
> 							Thanx, Paul

Ok so it crashed once and I got 3 successful reboots afterward.
Not sure what was the issue, not sure that's even due to my patches.

Anyway, I'll tell you if I see the crash again.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-07-16 22:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 18:26 [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 01/11] rcu: Settle config for userspace extended quiescent state Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 02/11] rcu: Allow rcu_user_enter()/exit() to nest Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 03/11] rcu: Ignore userspace extended quiescent state by default Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 04/11] rcu: Switch task's syscall hooks on context switch Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 05/11] x86: Syscall hooks for userspace RCU extended QS Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 06/11] x86: Exception " Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 07/11] rcu: Exit RCU extended QS on kernel preemption after irq/exception Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 08/11] rcu: Exit RCU extended QS on user preemption Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 09/11] x86: Use the new schedule_user API on userspace preemption Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 10/11] x86: Exit RCU extended QS on notify resume Frederic Weisbecker
2012-07-11 18:26 ` [PATCH 11/11] rcu: Userspace RCU extended QS selftest Frederic Weisbecker
2012-07-16 22:15 ` [RFC PATCH 00/11] rcu: Userspace RCU extended quiescent state v2 Paul E. McKenney
2012-07-16 22:57   ` Frederic Weisbecker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.