HomeFreeBSD

Correctly measure system load averages > 1024

Description

Correctly measure system load averages > 1024

The old fixed-point arithmetic used for calculating load averages had an
overflow at 1024. So on systems with extremely high load, the observed
load average would actually fall back to 0 and shoot up again, creating
a kind of sawtooth graph.

Fix this by using 64-bit math internally, while still reporting the load
average to userspace as a 32-bit number.

Sponsored by: Axcient
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D35134

(cherry picked from commit 1d2421ad8b6d508ef155752bdfc5948f7373bac3)

Details

Provenance
asomersAuthored on May 5 2022, 9:35 PM
Reviewer
imp
Differential Revision
D35134: Correctly measure system load averages > 1024
Parents
rG8272680eecb5: fusefs: annotate more file descriptor leaks in the tests
Branches
Unknown
Tags
Unknown