Skip to content

Commit 6c538e1

Browse files
committed
Merge tag 'sched_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Borislav Petkov: - Do not pull tasks to the local scheduling group if its average load is higher than the average system load * tag 'sched_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix imbalance overflow
2 parents e623175 + 91dcf1e commit 6c538e1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

kernel/sched/fair.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10238,6 +10238,16 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
1023810238

1023910239
sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
1024010240
sds->total_capacity;
10241+
10242+
/*
10243+
* If the local group is more loaded than the average system
10244+
* load, don't try to pull any tasks.
10245+
*/
10246+
if (local->avg_load >= sds->avg_load) {
10247+
env->imbalance = 0;
10248+
return;
10249+
}
10250+
1024110251
}
1024210252

1024310253
/*

0 commit comments

Comments
 (0)