diff options
| author | Hui Su <sh_def@163.com> | 2026-10-23 11:52:07 +0900 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-11-06 10:04:11 +0100 |
| commit | a0c755e574e37fddb59edf175f27dc3877e7fe23 (patch) | |
| tree | cf4ca14b75052a64ca789ba5a4c206f81b0a2e24 /tools/lib/python | |
| parent | c282051fc2cae2ea54770ebe435dbea090272c25 (diff) | |
sched/pelt: Fix u32 truncation of the PELT period count
accumulate_sum() computes the number of elapsed PELT periods in a
u64 but returns u32. When the count is a multiple of 2^32, it is
truncated to zero even though the PELT sums have been updated.
The caller interprets zero as no period boundary crossed and skips
recomputing the averages, leaving *_avg stale relative to *_sum.
Return the period count as u64 so the caller can test it without
truncation.
Fixes: a481db34b9be ("sched/fair: Optimize ___update_sched_avg()")
Signed-off-by: Hui Su <sh_def@163.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com>
Link: https://patch.msgid.link/20261023025207.2967903-1-sh_def@163.com
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
