diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2009-08-22 16:56:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-23 04:32:39 -0400 |
commit | a157229cabd6dd8cfa82525fc9bf730c94cc9ac2 (patch) | |
tree | 886013efc2f25dab915640acf46151fac7ae57b4 /include | |
parent | 22f00b69f6a7e1e18e821979a23e8307c2de9888 (diff) |
rcu: Simplify rcu_pending()/rcu_check_callbacks() API
All calls from outside RCU are of the form:
if (rcu_pending(cpu))
rcu_check_callbacks(cpu, user);
This is silly, instead we put a call to rcu_pending() in
rcu_check_callbacks(), and then make the outside calls be to
rcu_check_callbacks(). This cuts down on the code a bit and
also gives the compiler a better chance of optimizing.
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: <125097461311-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupreempt.h | 1 | ||||
-rw-r--r-- | include/linux/rcutree.h | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h index 6c9dd9cf8b8e..aff4772fb49e 100644 --- a/include/linux/rcupreempt.h +++ b/include/linux/rcupreempt.h | |||
@@ -66,7 +66,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
66 | 66 | ||
67 | extern void __rcu_read_lock(void); | 67 | extern void __rcu_read_lock(void); |
68 | extern void __rcu_read_unlock(void); | 68 | extern void __rcu_read_unlock(void); |
69 | extern int rcu_pending(int cpu); | ||
70 | extern int rcu_needs_cpu(int cpu); | 69 | extern int rcu_needs_cpu(int cpu); |
71 | 70 | ||
72 | #define __rcu_read_lock_bh() { rcu_read_lock(); local_bh_disable(); } | 71 | #define __rcu_read_lock_bh() { rcu_read_lock(); local_bh_disable(); } |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 8a0222ce3b13..c739d90f5e68 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -33,7 +33,6 @@ | |||
33 | extern void rcu_sched_qs(int cpu); | 33 | extern void rcu_sched_qs(int cpu); |
34 | extern void rcu_bh_qs(int cpu); | 34 | extern void rcu_bh_qs(int cpu); |
35 | 35 | ||
36 | extern int rcu_pending(int cpu); | ||
37 | extern int rcu_needs_cpu(int cpu); | 36 | extern int rcu_needs_cpu(int cpu); |
38 | 37 | ||
39 | static inline void __rcu_read_lock(void) | 38 | static inline void __rcu_read_lock(void) |