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 /kernel/timer.c | |
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 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index a7f07d5a6241..a3d25f415019 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1156,8 +1156,7 @@ void update_process_times(int user_tick) | |||
1156 | /* Note: this timer irq context must be accounted for as well. */ | 1156 | /* Note: this timer irq context must be accounted for as well. */ |
1157 | account_process_tick(p, user_tick); | 1157 | account_process_tick(p, user_tick); |
1158 | run_local_timers(); | 1158 | run_local_timers(); |
1159 | if (rcu_pending(cpu)) | 1159 | rcu_check_callbacks(cpu, user_tick); |
1160 | rcu_check_callbacks(cpu, user_tick); | ||
1161 | printk_tick(); | 1160 | printk_tick(); |
1162 | scheduler_tick(); | 1161 | scheduler_tick(); |
1163 | run_posix_cpu_timers(p); | 1162 | run_posix_cpu_timers(p); |