Repository navigation
Commit d5bb20c
sched/fair: Fix enqueue_task_fair warning
commit fe61468 upstream.
When a cfs rq is throttled, the latter and its child are removed from the
leaf list but their nr_running is not changed which includes staying higher
than 1. When a task is enqueued in this throttled branch, the cfs rqs must
be added back in order to ensure correct ordering in the list but this can
only happens if nr_running == 1.
When cfs bandwidth is used, we call unconditionnaly list_add_leaf_cfs_rq()
when enqueuing an entity to make sure that the complete branch will be
added.
Similarly unthrottle_cfs_rq() can stop adding cfs in the list when a parent
is throttled. Iterate the remaining entity to ensure that the complete
branch will be added in the list.
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: stable@vger.kernel.org
Cc: stable@vger.kernel.org #v5.1+
Link: https://lkml.kernel.org/r/20200306135257.25044-1-vincent.guittot@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e9f3847 commit d5bb20c
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3943 | 3943 | | |
3944 | 3944 | | |
3945 | 3945 | | |
| 3946 | + | |
3946 | 3947 | | |
3947 | 3948 | | |
3948 | 3949 | | |
| |||
4021 | 4022 | | |
4022 | 4023 | | |
4023 | 4024 | | |
4024 | | - | |
| 4025 | + | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
4025 | 4031 | | |
| 4032 | + | |
| 4033 | + | |
4026 | 4034 | | |
4027 | | - | |
4028 | 4035 | | |
4029 | 4036 | | |
4030 | 4037 | | |
| |||
4605 | 4612 | | |
4606 | 4613 | | |
4607 | 4614 | | |
4608 | | - | |
4609 | | - | |
4610 | 4615 | | |
4611 | 4616 | | |
4612 | 4617 | | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
4613 | 4631 | | |
4614 | 4632 | | |
4615 | 4633 | | |
| |||
0 commit comments