aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/clk.py
diff options
context:
space:
mode:
authorOdin Ugedal <[email protected]>2021-06-24 13:18:15 +0200
committerPeter Zijlstra <[email protected]>2021-06-28 15:42:24 +0200
commit1c35b07e6d3986474e5635be566e7bc79d97c64d (patch)
tree95af2f2d1be9845eb884cb67312b5a64fc80b80a /scripts/gdb/linux/clk.py
parentadf3c31e18b765ea24eba7b0c1efc076b8ee3d55 (diff)
sched/fair: Ensure _sum and _avg values stay consistent
The _sum and _avg values are in general sync together with the PELT divider. They are however not always completely in perfect sync, resulting in situations where _sum gets to zero while _avg stays positive. Such situations are undesirable. This comes from the fact that PELT will increase period_contrib, also increasing the PELT divider, without updating _sum and _avg values to stay in perfect sync where (_sum == _avg * divider). However, such PELT change will never lower _sum, making it impossible to end up in a situation where _sum is zero and _avg is not. Therefore, we need to ensure that when subtracting load outside PELT, that when _sum is zero, _avg is also set to zero. This occurs when (_sum < _avg * divider), and the subtracted (_avg * divider) is bigger or equal to the current _sum, while the subtracted _avg is smaller than the current _avg. Reported-by: Sachin Sant <[email protected]> Reported-by: Naresh Kamboju <[email protected]> Signed-off-by: Odin Ugedal <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Vincent Guittot <[email protected]> Tested-by: Sachin Sant <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/clk.py')
0 files changed, 0 insertions, 0 deletions