sched/fair: Cleanup newidle_balance
update_next_balance() uses sd->last_balance which is not modified by load_balance() so we can merge the 2 calls in one place. No functional change Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Acked-by: Mel Gorman <mgorman@suse.de> Link: https://lore.kernel.org/r/20211019123537.17146-6-vincent.guittot@linaro.org
This commit is contained in:
parent
c5b0a7eefc
commit
8ea9183db4
@ -10916,10 +10916,10 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
|
|||||||
int continue_balancing = 1;
|
int continue_balancing = 1;
|
||||||
u64 domain_cost;
|
u64 domain_cost;
|
||||||
|
|
||||||
if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost) {
|
update_next_balance(sd, &next_balance);
|
||||||
update_next_balance(sd, &next_balance);
|
|
||||||
|
if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost)
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (sd->flags & SD_BALANCE_NEWIDLE) {
|
if (sd->flags & SD_BALANCE_NEWIDLE) {
|
||||||
|
|
||||||
@ -10935,8 +10935,6 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
|
|||||||
t0 = t1;
|
t0 = t1;
|
||||||
}
|
}
|
||||||
|
|
||||||
update_next_balance(sd, &next_balance);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stop searching for tasks to pull if there are
|
* Stop searching for tasks to pull if there are
|
||||||
* now runnable tasks on this rq.
|
* now runnable tasks on this rq.
|
||||||
|
Loading…
Reference in New Issue
Block a user