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>
This commit is contained in:
committed by
Ingo Molnar
parent
22f00b69f6
commit
a157229cab
@ -133,8 +133,7 @@ consider_steal_time(unsigned long new_itm)
|
||||
account_idle_ticks(blocked);
|
||||
run_local_timers();
|
||||
|
||||
if (rcu_pending(cpu))
|
||||
rcu_check_callbacks(cpu, user_mode(get_irq_regs()));
|
||||
rcu_check_callbacks(cpu, user_mode(get_irq_regs()));
|
||||
|
||||
scheduler_tick();
|
||||
run_posix_cpu_timers(p);
|
||||
|
Reference in New Issue
Block a user