Re: [PATCH -tip 15/32] sched: Improve snapshotting of min_vruntime for CGroups

From: Peter Zijlstra
Date: Tue Nov 24 2020 - 05:42:51 EST


On Tue, Nov 17, 2020 at 06:19:45PM -0500, Joel Fernandes (Google) wrote:
> +static void se_fi_update(struct sched_entity *se, unsigned int fi_seq, bool forceidle)
> {
> - bool samecpu = task_cpu(a) == task_cpu(b);
> + bool root = true;
> + long old, new;

My compiler was not impressed by all those variable definitions.

> +
> + for_each_sched_entity(se) {
> + struct cfs_rq *cfs_rq = cfs_rq_of(se);
> +
> + if (forceidle) {
> + if (cfs_rq->forceidle_seq == fi_seq)
> + break;
> + cfs_rq->forceidle_seq = fi_seq;
> + }
> +
> + cfs_rq->min_vruntime_fi = cfs_rq->min_vruntime;
> + }
> +}