Re: [RFC PATCH v2 5/5] sched/fair: Simplify ancestor enqueue loops

From: Vincent Guittot
Date: Fri Sep 10 2021 - 07:43:54 EST


On Fri, 10 Sept 2021 at 13:35, Michal Koutný <mkoutny@xxxxxxxx> wrote:
>
> On Thu, Sep 09, 2021 at 04:04:02PM +0200, Vincent Guittot <vincent.guittot@xxxxxxxxxx> wrote:
> > These multiple break loops have been done to make unthrottle_cfs_rq,
> > throttle_cfs_rq, enqueue_task_fair and dequeue_task_fair to follow the
> > same pattern
>
> Ah, I watched only the unthrottle_cfs_rq and enqueue_task_fair pair and
> missed the consistency with the other two.
>
> > and I don't see any good reason to break this
>
> Isn't this a good reason
> > 21 insertions(+), 36 deletions(-)
> ?

Not if it make the code less readable and I prefer the current implementation

>
> (The stats are with a grain of salt, I'd need to recheck how these stats
> would hold if throttle_cfs_rq, dequeue_task_fair would be modified too +
> they look a bit better because of the loop from 1/5.)
>
> Michal