Re: [PATCH v5 5/6] sched/fair: Track peak per-entity utilization

From: Morten Rasmussen
Date: Mon Oct 17 2016 - 04:52:59 EST


On Fri, Oct 14, 2016 at 02:41:11PM +0100, Morten Rasmussen wrote:
> @@ -3515,6 +3517,10 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
> */
> if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE)
> update_min_vruntime(cfs_rq);
> +
> + /* Save peak PELT utilization for task to help wake-up decisions */
> + if (flags & DEQUEUE_SLEEP && entity_is_task(se))
> + se->avg.util_peak = se->avg.util_avg;
> }
>
> /*

The friendly kbuild robot swiftly pointed out that this doesn't build
for !CONFIG_SMP. The below replacement patch moves this bit inside
dequeue_entity_load_avg() which should be equivalent and not break
!CONFIG_SMP.

----8<---