]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Fix enqueue_task_fair() warning some more
authorPhil Auld <pauld@redhat.com>
Tue, 12 May 2020 13:52:22 +0000 (09:52 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 19 May 2020 18:34:10 +0000 (20:34 +0200)
commit501b52e711a9b5a7730d2a59dcfcf56fe2559939
tree3719e46ad1755f7720fb8fab9bdf19c4fceb553d
parent4bb5610f69410b69d078c15c5191e5ec9c502dd1
sched/fair: Fix enqueue_task_fair() warning some more

sched/fair: Fix enqueue_task_fair warning some more

The recent patch, 3fb9dff361d (sched/fair: Fix enqueue_task_fair warning)
did not fully resolve the issues with the rq->tmp_alone_branch !=
&rq->leaf_cfs_rq_list warning in enqueue_task_fair. There is a case where
the first for_each_sched_entity loop exits due to on_rq, having incompletely
updated the list.  In this case the second for_each_sched_entity loop can
further modify se. The later code to fix up the list management fails to do
what is needed because se does not point to the sched_entity which broke out
of the first loop. The list is not fixed up because the throttled parent was
already added back to the list by a task enqueue in a parallel child hierarchy.

Address this by calling list_add_leaf_cfs_rq if there are throttled parents
while doing the second for_each_sched_entity loop.

Fixes: 3fb9dff361d ("sched/fair: Fix enqueue_task_fair warning")
Suggested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20200512135222.GC2201@lorien.usersys.redhat.com
kernel/sched/fair.c