Loading kernel/sched/fair.c +22 −0 Original line number Diff line number Diff line Loading @@ -9146,6 +9146,19 @@ group_smaller_max_cpu_capacity(struct sched_group *sg, struct sched_group *ref) ref->sgc->max_capacity * 1024; } /* * group_similar_cpu_capacity: Returns true if the minimum capacity of the * compared groups differ by less than 12.5%. */ static inline bool group_similar_cpu_capacity(struct sched_group *sg, struct sched_group *ref) { long diff = sg->sgc->min_capacity - ref->sgc->min_capacity; long max = max(sg->sgc->min_capacity, ref->sgc->min_capacity); return abs(diff) < max >> 3; } static inline enum group_type group_classify(struct sched_group *group, struct sg_lb_stats *sgs) Loading Loading @@ -9324,6 +9337,15 @@ static bool update_sd_pick_busiest(struct lb_env *env, group_smaller_min_cpu_capacity(sds->local, sg)) return false; /* * Candidate sg doesn't face any severe imbalance issues so * don't disturb unless the groups are of similar capacity * where balancing is more harmless. */ if (sgs->group_type == group_other && !group_similar_cpu_capacity(sds->local, sg)) return false; /* * If we have more than one misfit sg go with the biggest misfit. */ Loading Loading
kernel/sched/fair.c +22 −0 Original line number Diff line number Diff line Loading @@ -9146,6 +9146,19 @@ group_smaller_max_cpu_capacity(struct sched_group *sg, struct sched_group *ref) ref->sgc->max_capacity * 1024; } /* * group_similar_cpu_capacity: Returns true if the minimum capacity of the * compared groups differ by less than 12.5%. */ static inline bool group_similar_cpu_capacity(struct sched_group *sg, struct sched_group *ref) { long diff = sg->sgc->min_capacity - ref->sgc->min_capacity; long max = max(sg->sgc->min_capacity, ref->sgc->min_capacity); return abs(diff) < max >> 3; } static inline enum group_type group_classify(struct sched_group *group, struct sg_lb_stats *sgs) Loading Loading @@ -9324,6 +9337,15 @@ static bool update_sd_pick_busiest(struct lb_env *env, group_smaller_min_cpu_capacity(sds->local, sg)) return false; /* * Candidate sg doesn't face any severe imbalance issues so * don't disturb unless the groups are of similar capacity * where balancing is more harmless. */ if (sgs->group_type == group_other && !group_similar_cpu_capacity(sds->local, sg)) return false; /* * If we have more than one misfit sg go with the biggest misfit. */ Loading