sched: Reduce trigger_load_balance() parameters
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 6 Jan 2014 11:34:38 +0000 (12:34 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 13 Jan 2014 12:47:26 +0000 (13:47 +0100)
The cpu information is already stored in the struct rq, so no need to pass it
as parameter to the trigger_load_balance function.

Cc: linaro-kernel@lists.linaro.org
Cc: preeti.lkml@gmail.com
Cc: mingo@redhat.com
Cc: peterz@infradead.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1389008085-9069-2-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h

index a549d9a22502502712c05c36ddd63b492edbd55c..392c6f87906e006f9cfddb502827d26bb9074a07 100644 (file)
@@ -2436,7 +2436,7 @@ void scheduler_tick(void)
 
 #ifdef CONFIG_SMP
        rq->idle_balance = idle_cpu(cpu);
-       trigger_load_balance(rq, cpu);
+       trigger_load_balance(rq);
 #endif
        rq_last_tick_reset(rq);
 }
index b73f4ba62b2466d3f3363f293a25152bd335227c..b35d3220161752d93892bd45ec2c6851bb9f4196 100644 (file)
@@ -6876,8 +6876,10 @@ static inline int on_null_domain(int cpu)
 /*
  * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing.
  */
-void trigger_load_balance(struct rq *rq, int cpu)
+void trigger_load_balance(struct rq *rq)
 {
+       int cpu = rq->cpu;
+
        /* Don't need to rebalance while attached to NULL domain */
        if (time_after_eq(jiffies, rq->next_balance) &&
            likely(!on_null_domain(cpu)))
index 89033909955029cdc1acac0e5ee5cf86ebc2f93b..c2119fd20f8b6dc2042a80603d44223ab9365dec 100644 (file)
@@ -1175,7 +1175,7 @@ extern const struct sched_class idle_sched_class;
 
 extern void update_group_power(struct sched_domain *sd, int cpu);
 
-extern void trigger_load_balance(struct rq *rq, int cpu);
+extern void trigger_load_balance(struct rq *rq);
 extern void idle_balance(int this_cpu, struct rq *this_rq);
 
 extern void idle_enter_fair(struct rq *this_rq);