On Thu, 2019-07-04 at 11:33 +0200, Vincent Guittot wrote:
> On Fri, 28 Jun 2019 at 22:49, Rik van Riel <r...@surriel.com> wrote:
> > Reducing the overhead of the CPU controller is achieved by not
> > walking
> > all the sched_entities every time a task is enqueued or dequeued.

> > @@ -7687,6 +7700,10 @@ static inline bool cfs_rq_is_decayed(struct
> > cfs_rq *cfs_rq)
> >         if (cfs_rq->avg.util_sum)
> >                 return false;
> > 
> > +       /* Remove decayed parents once their decayed children are
> > gone. */
> > +       if (cfs_rq->children_on_list)
> 
> I'm not sure that you really need to count whether childrens are on
> the list.
> Instead you can take advantage of the list ordering and you only have
> to test if the previous cfs_rq in the list is a child. If it's not
> then there is no more child
> 
> and you can remove the new field children_on_list and inc/dec it

Good suggestion. I'll do that for v3.

Thank you.

-- 
All Rights Reversed.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to