rcu: Remove "cpu" argument to rcu_check_callbacks()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 21 Oct 2014 14:53:02 +0000 (07:53 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 4 Nov 2014 03:20:11 +0000 (19:20 -0800)
The "cpu" argument was kept around on the off-chance that RCU might
offload scheduler-clock interrupts.  However, this offload approach
has been replaced by NO_HZ_FULL, which offloads -all- RCU processing
from qualifying CPUs.  It is therefore time to remove the "cpu" argument
to rcu_check_callbacks(), which this commit does.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
include/linux/rcupdate.h
kernel/rcu/tiny.c
kernel/rcu/tree.c
kernel/time/timer.c

index a4a819ffb2d116d1225608393481521ad3cacc88..b4ad275d90d0c0539f791a8faa56bb37a2b3e749 100644 (file)
@@ -260,7 +260,7 @@ static inline int rcu_preempt_depth(void)
 void rcu_init(void);
 void rcu_sched_qs(void);
 void rcu_bh_qs(void);
-void rcu_check_callbacks(int cpu, int user);
+void rcu_check_callbacks(int user);
 struct notifier_block;
 void rcu_idle_enter(void);
 void rcu_idle_exit(void);
index c0623fc471256abb404a5d49e8d4d805b7fb4ba7..01570c68d237c38647b94307ec79c7fc397b4f9c 100644 (file)
@@ -247,7 +247,7 @@ void rcu_bh_qs(void)
  * be called from hardirq context.  It is normally called from the
  * scheduling-clock interrupt.
  */
-void rcu_check_callbacks(int cpu, int user)
+void rcu_check_callbacks(int user)
 {
        RCU_TRACE(check_cpu_stalls());
        if (user || rcu_is_cpu_rrupt_from_idle())
index ab6fcfb4fe11c45f766c5f4c32a9542216f3d961..3107811bba6998829f33389cb6e276678d752804 100644 (file)
@@ -2388,7 +2388,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
  * invoked from the scheduling-clock interrupt.  If rcu_pending returns
  * false, there is no point in invoking rcu_check_callbacks().
  */
-void rcu_check_callbacks(int cpu, int user)
+void rcu_check_callbacks(int user)
 {
        trace_rcu_utilization(TPS("Start scheduler-tick"));
        increment_cpu_stall_ticks();
@@ -2420,8 +2420,8 @@ void rcu_check_callbacks(int cpu, int user)
 
                rcu_bh_qs();
        }
-       rcu_preempt_check_callbacks(cpu);
-       if (rcu_pending(cpu))
+       rcu_preempt_check_callbacks(smp_processor_id());
+       if (rcu_pending(smp_processor_id()))
                invoke_rcu_core();
        if (user)
                rcu_note_voluntary_context_switch(current);
index 3260ffdb368fbd9ae4617bddfc7aecf888880351..2d3f5c5049394615912b09ad16a4e639cb6cba9b 100644 (file)
@@ -1377,12 +1377,11 @@ unsigned long get_next_timer_interrupt(unsigned long now)
 void update_process_times(int user_tick)
 {
        struct task_struct *p = current;
-       int cpu = smp_processor_id();
 
        /* Note: this timer irq context must be accounted for as well. */
        account_process_tick(p, user_tick);
        run_local_timers();
-       rcu_check_callbacks(cpu, user_tick);
+       rcu_check_callbacks(user_tick);
 #ifdef CONFIG_IRQ_WORK
        if (in_irq())
                irq_work_tick();