diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-01-06 06:34:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-13 07:47:26 -0500 |
commit | 7caff66f361c44d0fbc74ed1cfa60a357fc84cf2 (patch) | |
tree | 1beaa6ab9caec9dcfbbe6ae43ecf1548b8cd8fdd | |
parent | de212f18e92c952533d57c5510d2790199c75734 (diff) |
sched: Reduce trigger_load_balance() parameters
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>
-rw-r--r-- | kernel/sched/core.c | 2 | ||||
-rw-r--r-- | kernel/sched/fair.c | 4 | ||||
-rw-r--r-- | kernel/sched/sched.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a549d9a22502..392c6f87906e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -2436,7 +2436,7 @@ void scheduler_tick(void) | |||
2436 | 2436 | ||
2437 | #ifdef CONFIG_SMP | 2437 | #ifdef CONFIG_SMP |
2438 | rq->idle_balance = idle_cpu(cpu); | 2438 | rq->idle_balance = idle_cpu(cpu); |
2439 | trigger_load_balance(rq, cpu); | 2439 | trigger_load_balance(rq); |
2440 | #endif | 2440 | #endif |
2441 | rq_last_tick_reset(rq); | 2441 | rq_last_tick_reset(rq); |
2442 | } | 2442 | } |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b73f4ba62b24..b35d32201617 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -6876,8 +6876,10 @@ static inline int on_null_domain(int cpu) | |||
6876 | /* | 6876 | /* |
6877 | * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing. | 6877 | * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing. |
6878 | */ | 6878 | */ |
6879 | void trigger_load_balance(struct rq *rq, int cpu) | 6879 | void trigger_load_balance(struct rq *rq) |
6880 | { | 6880 | { |
6881 | int cpu = rq->cpu; | ||
6882 | |||
6881 | /* Don't need to rebalance while attached to NULL domain */ | 6883 | /* Don't need to rebalance while attached to NULL domain */ |
6882 | if (time_after_eq(jiffies, rq->next_balance) && | 6884 | if (time_after_eq(jiffies, rq->next_balance) && |
6883 | likely(!on_null_domain(cpu))) | 6885 | likely(!on_null_domain(cpu))) |
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 890339099550..c2119fd20f8b 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -1175,7 +1175,7 @@ extern const struct sched_class idle_sched_class; | |||
1175 | 1175 | ||
1176 | extern void update_group_power(struct sched_domain *sd, int cpu); | 1176 | extern void update_group_power(struct sched_domain *sd, int cpu); |
1177 | 1177 | ||
1178 | extern void trigger_load_balance(struct rq *rq, int cpu); | 1178 | extern void trigger_load_balance(struct rq *rq); |
1179 | extern void idle_balance(int this_cpu, struct rq *this_rq); | 1179 | extern void idle_balance(int this_cpu, struct rq *this_rq); |
1180 | 1180 | ||
1181 | extern void idle_enter_fair(struct rq *this_rq); | 1181 | extern void idle_enter_fair(struct rq *this_rq); |