Skip to content

Commit dead45b

Browse files
Peter Zijlstragregkh
authored andcommitted
sched: Ensure update_cfs_shares() is called for parents of continuously-running tasks
commit bf0bd94 upstream. We typically update a task_group's shares within the dequeue/enqueue path. However, continuously running tasks sharing a CPU are not subject to these updates as they are only put/picked. Unfortunately, when we reverted f269ae0 (in 17bc14b), we lost the augmenting periodic update that was supposed to account for this; resulting in a potential loss of fairness. To fix this, re-introduce the explicit update in update_cfs_rq_blocked_load() [called via entity_tick()]. Reported-by: Max Hailperin <max@gustavus.edu> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Paul Turner <pjt@google.com> Link: http://lkml.kernel.org/n/tip-9545m3apw5d93ubyrotrj31y@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f30d87b commit dead45b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/sched/fair.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,6 +1984,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
19841984
*/
19851985
update_entity_load_avg(curr, 1);
19861986
update_cfs_rq_blocked_load(cfs_rq, 1);
1987+
update_cfs_shares(cfs_rq);
19871988

19881989
#ifdef CONFIG_SCHED_HRTICK
19891990
/*

0 commit comments

Comments
 (0)