sched/fair: use user weight to calculate util_avg in post_init_entity_util_avg()
PATCH 1/1 sched/fair: use user weight to calculate util_avg in post_init_entity_util_avg()
To calculate util_avg, se's weight should have the same resolution as cfs->avg.load_avg. So use user weight instead.
Signed-off-by T.Zhou <[email protected]>
--- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/fair.c +2 -1
@@ -792,7 +792,8 @@ void post_init_entity_util_avg(struct sched_entity *se)if (cap >0 ) {if (cfs_rq->avg.util_avg !=0 ) { - sa->util_avg = cfs_rq->avg.util_avg * se->load.weight; + sa->util_avg = cfs_rq->avg.util_avg * +scale_load_down (se->load.weight); sa->util_avg /= (cfs_rq->avg.load_avg +1 );if (sa->util_avg > cap)
Signature · 1 line
2.7.3