Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
psi: Fix a division error in psi poll()
The psi window size is a u64 an can be up to 10 seconds right now, which exceeds the lower 32 bits of the variable. We currently use div_u64 for it, which is meant only for 32-bit divisors. The result is garbage pressure sampling values and even potential div0 crashes. Use div64_u64. Signed-off-by: Johannes Weiner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Suren Baghdasaryan <[email protected]> Cc: Jingfeng Xie <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
- Loading branch information