aboutsummaryrefslogtreecommitdiffstats
path: root/init/Kconfig
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-08-22 16:56:52 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-23 04:32:40 -0400
commitf41d911f8c49a5d65c86504c19e8204bb605c4fd (patch)
tree59bcd3048652ef290b3e19d2904409afd5c90eb3 /init/Kconfig
parenta157229cabd6dd8cfa82525fc9bf730c94cc9ac2 (diff)
rcu: Merge preemptable-RCU functionality into hierarchical RCU
Create a kernel/rcutree_plugin.h file that contains definitions for preemptable RCU (or, under the #else branch of the #ifdef, empty definitions for the classic non-preemptable semantics). These definitions fit into plugins defined in kernel/rcutree.c for this purpose. This variant of preemptable RCU uses a new algorithm whose read-side expense is roughly that of classic hierarchical RCU under CONFIG_PREEMPT. This new algorithm's update-side expense is similar to that of classic hierarchical RCU, and, in absence of read-side preemption or blocking, is exactly that of classic hierarchical RCU. Perhaps more important, this new algorithm has a much simpler implementation, saving well over 1,000 lines of code compared to mainline's implementation of preemptable RCU, which will hopefully be retired in favor of this new algorithm. The simplifications are obtained by maintaining per-task nesting state for running tasks, and using a simple lock-protected algorithm to handle accounting when tasks block within RCU read-side critical sections, making use of lessons learned while creating numerous user-level RCU implementations over the past 18 months. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: akpm@linux-foundation.org Cc: mathieu.desnoyers@polymtl.ca Cc: josht@linux.vnet.ibm.com Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org LKML-Reference: <12509746134003-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init/Kconfig')
-rw-r--r--init/Kconfig22
1 files changed, 16 insertions, 6 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 25373cf32672..f88da2d1c1fb 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -335,11 +335,20 @@ config PREEMPT_RCU
335 now-naive assumptions about each RCU read-side critical section 335 now-naive assumptions about each RCU read-side critical section
336 remaining on a given CPU through its execution. 336 remaining on a given CPU through its execution.
337 337
338config TREE_PREEMPT_RCU
339 bool "Preemptable tree-based hierarchical RCU"
340 depends on PREEMPT
341 help
342 This option selects the RCU implementation that is
343 designed for very large SMP systems with hundreds or
344 thousands of CPUs, but for which real-time response
345 is also required.
346
338endchoice 347endchoice
339 348
340config RCU_TRACE 349config RCU_TRACE
341 bool "Enable tracing for RCU" 350 bool "Enable tracing for RCU"
342 depends on TREE_RCU || PREEMPT_RCU 351 depends on TREE_RCU || PREEMPT_RCU || TREE_PREEMPT_RCU
343 help 352 help
344 This option provides tracing in RCU which presents stats 353 This option provides tracing in RCU which presents stats
345 in debugfs for debugging RCU implementation. 354 in debugfs for debugging RCU implementation.
@@ -351,7 +360,7 @@ config RCU_FANOUT
351 int "Tree-based hierarchical RCU fanout value" 360 int "Tree-based hierarchical RCU fanout value"
352 range 2 64 if 64BIT 361 range 2 64 if 64BIT
353 range 2 32 if !64BIT 362 range 2 32 if !64BIT
354 depends on TREE_RCU 363 depends on TREE_RCU || TREE_PREEMPT_RCU
355 default 64 if 64BIT 364 default 64 if 64BIT
356 default 32 if !64BIT 365 default 32 if !64BIT
357 help 366 help
@@ -366,7 +375,7 @@ config RCU_FANOUT
366 375
367config RCU_FANOUT_EXACT 376config RCU_FANOUT_EXACT
368 bool "Disable tree-based hierarchical RCU auto-balancing" 377 bool "Disable tree-based hierarchical RCU auto-balancing"
369 depends on TREE_RCU 378 depends on TREE_RCU || TREE_PREEMPT_RCU
370 default n 379 default n
371 help 380 help
372 This option forces use of the exact RCU_FANOUT value specified, 381 This option forces use of the exact RCU_FANOUT value specified,
@@ -379,11 +388,12 @@ config RCU_FANOUT_EXACT
379 Say N if unsure. 388 Say N if unsure.
380 389
381config TREE_RCU_TRACE 390config TREE_RCU_TRACE
382 def_bool RCU_TRACE && TREE_RCU 391 def_bool RCU_TRACE && ( TREE_RCU || TREE_PREEMPT_RCU )
383 select DEBUG_FS 392 select DEBUG_FS
384 help 393 help
385 This option provides tracing for the TREE_RCU implementation, 394 This option provides tracing for the TREE_RCU and
386 permitting Makefile to trivially select kernel/rcutree_trace.c. 395 TREE_PREEMPT_RCU implementations, permitting Makefile to
396 trivially select kernel/rcutree_trace.c.
387 397
388config PREEMPT_RCU_TRACE 398config PREEMPT_RCU_TRACE
389 def_bool RCU_TRACE && PREEMPT_RCU 399 def_bool RCU_TRACE && PREEMPT_RCU