diff options
author | Odin Ugedal <odin@uged.al> | 2021-06-12 13:28:15 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-06-14 22:58:47 +0200 |
commit | a7b359fc6a37faaf472125867c8dc5a068c90982 (patch) | |
tree | 0049e0bdbb83e9cd202472ce366458c2e49b17dd /fs/nfsd/nfs4layouts.c | |
parent | Linux 5.13-rc6 (diff) | |
download | linux-a7b359fc6a37faaf472125867c8dc5a068c90982.tar.xz linux-a7b359fc6a37faaf472125867c8dc5a068c90982.zip |
sched/fair: Correctly insert cfs_rq's to list on unthrottle
Fix an issue where fairness is decreased since cfs_rq's can end up not
being decayed properly. For two sibling control groups with the same
priority, this can often lead to a load ratio of 99/1 (!!).
This happens because when a cfs_rq is throttled, all the descendant
cfs_rq's will be removed from the leaf list. When they initial cfs_rq
is unthrottled, it will currently only re add descendant cfs_rq's if
they have one or more entities enqueued. This is not a perfect
heuristic.
Instead, we insert all cfs_rq's that contain one or more enqueued
entities, or it its load is not completely decayed.
Can often lead to situations like this for equally weighted control
groups:
$ ps u -C stress
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 10009 88.8 0.0 3676 100 pts/1 R+ 11:04 0:13 stress --cpu 1
root 10023 3.0 0.0 3676 104 pts/1 R+ 11:04 0:00 stress --cpu 1
Fixes: 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()")
[vingo: !SMP build fix]
Signed-off-by: Odin Ugedal <odin@uged.al>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20210612112815.61678-1-odin@uged.al
Diffstat (limited to 'fs/nfsd/nfs4layouts.c')
0 files changed, 0 insertions, 0 deletions