diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-04-02 19:17:17 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-05-10 14:08:34 -0400 |
commit | bbad937983147c017c25406860287cb94da9af7c (patch) | |
tree | 57311598c360b92b189c7ec337146e4bc779c73d /include | |
parent | 25502a6c13745f4650cc59322bd198194f55e796 (diff) |
rcu: slim down rcutiny by removing rcu_scheduler_active and friends
TINY_RCU does not need rcu_scheduler_active unless CONFIG_DEBUG_LOCK_ALLOC.
So conditionally compile rcu_scheduler_active in order to slim down
rcutiny a bit more. Also gets rid of an EXPORT_SYMBOL_GPL, which is
responsible for most of the slimming.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupdate.h | 4 | ||||
-rw-r--r-- | include/linux/rcutiny.h | 13 | ||||
-rw-r--r-- | include/linux/rcutree.h | 3 |
3 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index d8fb2abcf303..23be3a702516 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -64,8 +64,6 @@ extern int sched_expedited_torture_stats(char *page); | |||
64 | 64 | ||
65 | /* Internal to kernel */ | 65 | /* Internal to kernel */ |
66 | extern void rcu_init(void); | 66 | extern void rcu_init(void); |
67 | extern int rcu_scheduler_active; | ||
68 | extern void rcu_scheduler_starting(void); | ||
69 | 67 | ||
70 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 68 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
71 | #include <linux/rcutree.h> | 69 | #include <linux/rcutree.h> |
@@ -178,7 +176,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
178 | #ifdef CONFIG_PREEMPT | 176 | #ifdef CONFIG_PREEMPT |
179 | static inline int rcu_read_lock_sched_held(void) | 177 | static inline int rcu_read_lock_sched_held(void) |
180 | { | 178 | { |
181 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); | 179 | return preempt_count() != 0 || irqs_disabled(); |
182 | } | 180 | } |
183 | #else /* #ifdef CONFIG_PREEMPT */ | 181 | #else /* #ifdef CONFIG_PREEMPT */ |
184 | static inline int rcu_read_lock_sched_held(void) | 182 | static inline int rcu_read_lock_sched_held(void) |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index ff22b97fb979..14e5a76b2c06 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -128,4 +128,17 @@ static inline int rcu_preempt_depth(void) | |||
128 | return 0; | 128 | return 0; |
129 | } | 129 | } |
130 | 130 | ||
131 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
132 | |||
133 | extern int rcu_scheduler_active __read_mostly; | ||
134 | extern void rcu_scheduler_starting(void); | ||
135 | |||
136 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
137 | |||
138 | static inline void rcu_scheduler_starting(void) | ||
139 | { | ||
140 | } | ||
141 | |||
142 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
143 | |||
131 | #endif /* __LINUX_RCUTINY_H */ | 144 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index b9f74606f320..48282055e83d 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -123,4 +123,7 @@ static inline int rcu_blocking_is_gp(void) | |||
123 | return num_online_cpus() == 1; | 123 | return num_online_cpus() == 1; |
124 | } | 124 | } |
125 | 125 | ||
126 | extern void rcu_scheduler_starting(void); | ||
127 | extern int rcu_scheduler_active __read_mostly; | ||
128 | |||
126 | #endif /* __LINUX_RCUTREE_H */ | 129 | #endif /* __LINUX_RCUTREE_H */ |