Skip to content

Commit c5b0a7e

Browse files
vingu-linaroPeter Zijlstra
authored andcommitted
sched/fair: Remove sysctl_sched_migration_cost condition
With a default value of 500us, sysctl_sched_migration_cost is significanlty higher than the cost of load_balance. Remove the condition and rely on the sd->max_newidle_lb_cost to abort newidle_balance. Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org> 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-5-vincent.guittot@linaro.org
1 parent e60b56e commit c5b0a7e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

kernel/sched/fair.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10895,8 +10895,7 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
1089510895
rcu_read_lock();
1089610896
sd = rcu_dereference_check_sched_domain(this_rq->sd);
1089710897

10898-
if (this_rq->avg_idle < sysctl_sched_migration_cost ||
10899-
!READ_ONCE(this_rq->rd->overload) ||
10898+
if (!READ_ONCE(this_rq->rd->overload) ||
1090010899
(sd && this_rq->avg_idle < sd->max_newidle_lb_cost)) {
1090110900

1090210901
if (sd)

0 commit comments

Comments
 (0)