Re: [PATCH 2/3] sched/fair: Correctly insert cfs_rq's to list on unthrottle

From
Odin Ugedal <hidden>
Date
2021-05-29 09:34:17
Also in
lkml
Reply to
Vincent Guittot, 2021-05-28
Hi,
normally tg_load_avg_contrib should be null when cfs_rq_is_decayed()
Yeah, I think that is an ok assumption of how it _should_ work (given
the other patches in flight are merged).
The reason of this list is to ensure that the load of all cfs_rq are
periodically updated  as it is then used to share the runtime between
groups so we should keep to use the rule whenever possible.
Yeah, right.
we probably need to keep (cfs_rq->nr_running >= 1) as we can have case
where tg_load_avg_contrib is null but a task is enqueued
Yeah, there is probably a chance of enqueuing a task without any load,
and then a parent gets throttled.
So (cfs_rq->tg_load_avg_contrib || cfs_rq->nr_running) is probably the
way to go if we want to avoid
a new field. Will resend a patch with that instead.

In case the new field is the main issue with the original solution, we
could also change the on_list int to have three modes like; NO, YES,
THROTTLED/PAUSED, but that would require a bigger rewrite of the other
logic, so probably outside the scope of this patch.

Thanks
Odin
Thread (23 messages) 23 messages, 2 authors, last reply 2021-05-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help