From: Morten Rasmussen Date: Tue, 7 Mar 2017 16:41:26 +0000 (+0000) Subject: sched/fair: Avoid unnecessary balancing of asymmetric capacity groups X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eedd0d4b0d0d0aaa64ffa3946ed9f5a2d2738ef2;p=platform%2Fkernel%2Flinux-exynos.git sched/fair: Avoid unnecessary balancing of asymmetric capacity groups On systems with asymmetric cpu capacities, a skewed load distribution might yield better throughput than balancing load per group capacity. For example, running compute intensive tasks on high capacity cpus while leaving low capacity cpus idle. So we let load-balance back off if the busiest group isn't really overloaded. cc: Ingo Molnar cc: Peter Zijlstra Signed-off-by: Morten Rasmussen Signed-off-by: Lukasz Luba --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ccf562f70ec1..be7bbc12ef07 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7876,6 +7876,15 @@ static bool update_sd_pick_busiest(struct lb_env *env, group_smaller_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; + asym_packing: /* This is the busiest node in its class. */ if (!(env->sd->flags & SD_ASYM_PACKING))