]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Temporarily widen count for interrupt rate calculations on 32-bit archs
authorjhibbits <jhibbits@FreeBSD.org>
Thu, 8 Feb 2018 05:18:30 +0000 (05:18 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Thu, 8 Feb 2018 05:18:30 +0000 (05:18 +0000)
commit894ad0f64080715b041b67cde1496dda052b6f1c
tree1caefe297fad5af4938440285ac984fd29d9423c
parentd0186d492468175d0d48abd7138d93be43fa176d
Temporarily widen count for interrupt rate calculations on 32-bit archs

If the interrupt count is very high (greater than ~42M), notably on one-shot
execution on long running systems, the intermediate multiplication step in the
rate calculation will overflow the width of a 32-bit architecture long (32
bits), causing the rest of the calculation to calculate with a truncated value,
and report very low rates (sometimes 0).

MFC after: 2 weeks
usr.bin/vmstat/vmstat.c