diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-06-29 19:49:16 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-08-20 11:55:00 -0400 |
commit | a57eb940d130477a799dfb24a570ee04979c0f7f (patch) | |
tree | 5add1c135a302cf1c1a454b0620ed17eb802923b /include/linux/rcupdate.h | |
parent | 4d87ffadbba88105f33271bef5f2c79366c6a4e1 (diff) |
rcu: Add a TINY_PREEMPT_RCU
Implement a small-memory-footprint uniprocessor-only implementation of
preemptible RCU. This implementation uses but a single blocked-tasks
list rather than the combinatorial number used per leaf rcu_node by
TREE_PREEMPT_RCU, which reduces memory consumption and greatly simplifies
processing. This version also takes advantage of uniprocessor execution
to accelerate grace periods in the case where there are no readers.
The general design is otherwise broadly similar to that of TREE_PREEMPT_RCU.
This implementation is a step towards having RCU implementation driven
off of the SMP and PREEMPT kernel configuration variables, which can
happen once this implementation has accumulated sufficient experience.
Removed ACCESS_ONCE() from __rcu_read_unlock() and added barrier() as
suggested by Steve Rostedt in order to avoid the compiler-reordering
issue noted by Mathieu Desnoyers (http://lkml.org/lkml/2010/8/16/183).
As can be seen below, CONFIG_TINY_PREEMPT_RCU represents almost 5Kbyte
savings compared to CONFIG_TREE_PREEMPT_RCU. Of course, for non-real-time
workloads, CONFIG_TINY_RCU is even better.
CONFIG_TREE_PREEMPT_RCU
text data bss dec filename
13 0 0 13 kernel/rcupdate.o
6170 825 28 7023 kernel/rcutree.o
----
7026 Total
CONFIG_TINY_PREEMPT_RCU
text data bss dec filename
13 0 0 13 kernel/rcupdate.o
2081 81 8 2170 kernel/rcutiny.o
----
2183 Total
CONFIG_TINY_RCU (non-preemptible)
text data bss dec filename
13 0 0 13 kernel/rcupdate.o
719 25 0 744 kernel/rcutiny.o
---
757 Total
Requested-by: Loïc Minier <loic.minier@canonical.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 27b44b3e3024..24b896649384 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -58,7 +58,6 @@ struct rcu_head { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* Exported common interfaces */ | 60 | /* Exported common interfaces */ |
61 | extern void rcu_barrier(void); | ||
62 | extern void rcu_barrier_bh(void); | 61 | extern void rcu_barrier_bh(void); |
63 | extern void rcu_barrier_sched(void); | 62 | extern void rcu_barrier_sched(void); |
64 | extern void synchronize_sched_expedited(void); | 63 | extern void synchronize_sched_expedited(void); |
@@ -69,7 +68,7 @@ extern void rcu_init(void); | |||
69 | 68 | ||
70 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 69 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
71 | #include <linux/rcutree.h> | 70 | #include <linux/rcutree.h> |
72 | #elif defined(CONFIG_TINY_RCU) | 71 | #elif defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) |
73 | #include <linux/rcutiny.h> | 72 | #include <linux/rcutiny.h> |
74 | #else | 73 | #else |
75 | #error "Unknown RCU implementation specified to kernel configuration" | 74 | #error "Unknown RCU implementation specified to kernel configuration" |