Message ID | 20171109164117.19401-5-patrick.bellasi@arm.com |
---|---|
State | Superseded |
Headers | show |
Series | Utilization estimation (util_est) for FAIR tasks | expand |
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 137733db6727..d72231e30d44 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -183,7 +183,11 @@ static void sugov_get_util(unsigned long *util, unsigned long *max, int cpu) cfs_max = arch_scale_cpu_capacity(NULL, cpu); - *util = min(rq->cfs.avg.util_avg, cfs_max); + *util = rq->cfs.avg.util_avg; + if (sched_feat(UTIL_EST)) + *util = max(*util, rq->cfs.util_est_runnable); + *util = min(*util, cfs_max); + *max = cfs_max; }