From: lakkyung.jung Date: Tue, 13 Mar 2018 10:05:13 +0000 (+0900) Subject: [COMMON] sched: fair: Adjust average load considering CPU capacity. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d62be95bcc80be0a26696f7206afff8cb4b0e0f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] sched: fair: Adjust average load considering CPU capacity. Change-Id: Id606bb8ebe305f684ed097da5fd7fa809eae5f17 Signed-off-by: lakkyung.jung --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 82dad9ecddb8..6c224355bf92 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8989,6 +8989,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, { unsigned long load; int i, nr_running; + unsigned int sg_cpu; memset(sgs, 0, sizeof(*sgs)); @@ -9033,8 +9034,10 @@ static inline void update_sg_lb_stats(struct lb_env *env, } /* Adjust by relative CPU capacity of the group */ + sg_cpu = cpumask_first(sched_group_span(group)); sgs->group_capacity = group->sgc->capacity; - sgs->avg_load = (sgs->group_load*SCHED_CAPACITY_SCALE) / sgs->group_capacity; + sgs->avg_load = (sgs->group_load * capacity_orig_of(sg_cpu)) / + sgs->group_capacity; if (sgs->sum_nr_running) sgs->load_per_task = sgs->sum_weighted_load / sgs->sum_nr_running;