Re: [RFC PATCH 4/6] Preempt-RCU: Implementation

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roman Zippel <zippel@...>
Cc: <ego@...>, <linux-kernel@...>, <linux-rt-users@...>, Ingo Molnar <mingo@...>, Steven Rostedt <rostedt@...>, Dipankar Sarma <dipankar@...>, Ted Tso <tytso@...>, <dvhltc@...>, Oleg Nesterov <oleg@...>, Andrew Morton <akpm@...>, <bunk@...>, Josh Triplett <josh@...>, Thomas Gleixner <tglx@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Saturday, March 1, 2008 - 3:39 pm

On Fri, Feb 29, 2008 at 01:38:15PM +0100, Roman Zippel wrote:

Is this what you had in mind?  I don't have any way to test on a
system not supporting CONFIG_PREEMPT, but seems to work on x86.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 init/Kconfig           |   34 +++-------------------------------
 kernel/Kconfig.preempt |   15 +++++++++++++++
 2 files changed, 18 insertions(+), 31 deletions(-)

diff -urpNa -X dontdiff linux-2.6.25-rc3/init/Kconfig linux-2.6.25-rc3-preempt_rcu/init/Kconfig
--- linux-2.6.25-rc3/init/Kconfig	2008-02-26 16:58:42.000000000 -0800
+++ linux-2.6.25-rc3-preempt_rcu/init/Kconfig	2008-03-01 11:30:59.000000000 -0800
@@ -860,38 +860,10 @@ source "block/Kconfig"
 config PREEMPT_NOTIFIERS
 	bool
 
-choice
-	prompt "RCU implementation type:"
-	default CLASSIC_RCU
-	help
-	  This allows you to choose either the classic RCU implementation
-	  that is designed for best read-side performance on non-realtime
-	  systems, or the preemptible RCU implementation for best latency
-	  on realtime systems.  Note that some kernel preemption modes
-	  will restrict your choice.
-
-	  Select the default if you are unsure.
-
 config CLASSIC_RCU
-	bool "Classic RCU"
+	def_bool !PREEMPT_RCU
 	help
 	  This option selects the classic RCU implementation that is
 	  designed for best read-side performance on non-realtime
-	  systems.
-
-	  Say Y if you are unsure.
-
-config PREEMPT_RCU
-	bool "Preemptible RCU"
-	depends on PREEMPT
-	help
-	  This option reduces the latency of the kernel by making certain
-	  RCU sections preemptible. Normally RCU code is non-preemptible, if
-	  this option is selected then read-only RCU sections become
-	  preemptible. This helps latency, but may expose bugs due to
-	  now-naive assumptions about each RCU read-side critical section
-	  remaining on a given CPU through its execution.
-
-	  Say N if you are unsure.
-
-endchoice
+	  systems.  Classic RCU is the default.  Note that the
+	  PREEMPT_RCU symbol is used to select/deselect this option.
diff -urpNa -X dontdiff linux-2.6.25-rc3/kernel/Kconfig.preempt linux-2.6.25-rc3-preempt_rcu/kernel/Kconfig.preempt
--- linux-2.6.25-rc3/kernel/Kconfig.preempt	2008-02-26 16:58:42.000000000 -0800
+++ linux-2.6.25-rc3-preempt_rcu/kernel/Kconfig.preempt	2008-03-01 11:35:39.000000000 -0800
@@ -52,8 +52,23 @@ config PREEMPT
 
 endchoice
 
+config PREEMPT_RCU
+	bool "Preemptible RCU"
+	depends on PREEMPT
+	default n
+	help
+	  This option reduces the latency of the kernel by making certain
+	  RCU sections preemptible. Normally RCU code is non-preemptible, if
+	  this option is selected then read-only RCU sections become
+	  preemptible. This helps latency, but may expose bugs due to
+	  now-naive assumptions about each RCU read-side critical section
+	  remaining on a given CPU through its execution.
+
+	  Say N if you are unsure.
+
 config RCU_TRACE
 	bool "Enable tracing for RCU - currently stats in debugfs"
+	depends on PREEMPT_RCU
 	select DEBUG_FS
 	default y
 	help
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/6] RCU: Preemptible-RCU, Gautham R Shenoy, (Thu Dec 13, 1:03 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Ingo Molnar, (Thu Dec 13, 4:38 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Paul E. McKenney, (Thu Dec 13, 7:41 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Steven Rostedt, (Thu Dec 13, 1:36 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Gautham R Shenoy, (Thu Dec 13, 5:09 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Ingo Molnar, (Thu Dec 13, 4:42 pm)
Re: [RFC PATCH 0/6] RCU: Preemptible-RCU, Steven Rostedt, (Thu Dec 13, 4:56 pm)
[RFC PATCH 6/6] Preempt-RCU: Update RCU Documentation., Gautham R Shenoy, (Thu Dec 13, 1:18 pm)
Re: [RFC PATCH 6/6] Preempt-RCU: Update RCU Documentation., Gautham R Shenoy, (Thu Dec 13, 5:06 pm)
[RFC PATCH 4/6] Preempt-RCU: Implementation, Gautham R Shenoy, (Thu Dec 13, 1:16 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Fri Feb 29, 12:34 am)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Steven Rostedt, (Fri Feb 29, 9:53 am)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Fri Feb 29, 10:31 am)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Paul E. McKenney, (Fri Feb 29, 12:53 am)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Fri Feb 29, 8:38 am)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Paul E. McKenney, (Sat Mar 1, 3:39 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Sat Mar 1, 11:06 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Paul E. McKenney, (Mon Mar 3, 2:55 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Tue Mar 4, 4:49 pm)
[PATCH] move PREEMPT_RCU config option back under PREEMPT, Paul E. McKenney, (Tue Mar 4, 4:22 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Steven Rostedt, (Sat Mar 1, 5:07 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Roman Zippel, (Sat Mar 1, 11:09 pm)
Re: [RFC PATCH 4/6] Preempt-RCU: Implementation, Steven Rostedt, (Fri Feb 29, 9:55 am)
[RFC PATCH 5/6] Preempt-RCU: CPU Hotplug handling, Gautham R Shenoy, (Thu Dec 13, 1:17 pm)
Re: [RFC PATCH 2/6] Preempt-RCU: Reorganize RCU code into rc..., Paul E. McKenney, (Fri Dec 14, 12:12 pm)