Please sign in to comment.
Compute load in nanoseconds
When computing the load_slice per irq we take the topology object load divided by the interrupt count for the object. Both of these values are integervalues which means if the interrupt count is larger than the load we get a load_slice of 0. It seems likely that on modern processors interrupt durations will be at least multiple nanoseconds long so if we compute load in nanoseconds it should be >= the interrupt count. The load is recomputed every SLEEP_INTERVAL which is currently 10s which makes the maximum possible load 10e9 which easily fits in a uint64_t. Note: corrected error checking on sysconf usage Signed-off-by: Shawn Bohrer <email@example.com> Signed-off-by: Neil Horman <firstname.lastname@example.org>
- Loading branch information...
Showing with 15 additions and 5 deletions.