Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a725627 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Ingo Molnar
Browse files

sched: Reduce nohz_kick_needed() parameters



The cpu information is already stored in the struct rq, so no need to pass it
as parameter to the nohz_kick_needed function.

The caller of this function just called idle_cpu() before to fill the
rq->idle_balance field.

Use rq->cpu and rq->idle_balance.

Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1389008085-9069-3-git-send-email-daniel.lezcano@linaro.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 7caff66f
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -6788,14 +6788,14 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle)
 *   - For SD_ASYM_PACKING, if the lower numbered cpu's in the scheduler
 *   - For SD_ASYM_PACKING, if the lower numbered cpu's in the scheduler
 *     domain span are idle.
 *     domain span are idle.
 */
 */
static inline int nohz_kick_needed(struct rq *rq, int cpu)
static inline int nohz_kick_needed(struct rq *rq)
{
{
	unsigned long now = jiffies;
	unsigned long now = jiffies;
	struct sched_domain *sd;
	struct sched_domain *sd;
	struct sched_group_power *sgp;
	struct sched_group_power *sgp;
	int nr_busy;
	int nr_busy, cpu = rq->cpu;


	if (unlikely(idle_cpu(cpu)))
	if (unlikely(rq->idle_balance))
		return 0;
		return 0;


       /*
       /*
@@ -6885,7 +6885,7 @@ void trigger_load_balance(struct rq *rq)
	    likely(!on_null_domain(cpu)))
	    likely(!on_null_domain(cpu)))
		raise_softirq(SCHED_SOFTIRQ);
		raise_softirq(SCHED_SOFTIRQ);
#ifdef CONFIG_NO_HZ_COMMON
#ifdef CONFIG_NO_HZ_COMMON
	if (nohz_kick_needed(rq, cpu) && likely(!on_null_domain(cpu)))
	if (nohz_kick_needed(rq) && likely(!on_null_domain(cpu)))
		nohz_balancer_kick(cpu);
		nohz_balancer_kick(cpu);
#endif
#endif
}
}