Messages in this thread | | | Subject | Re: Why do we still have 32 bit counters? Interrupt counters overflow within 50 days | From | Paul Bolle <> | Date | Fri, 03 Oct 2014 14:15:12 +0200 |
| |
On Fri, 2014-10-03 at 06:54 -0500, Christoph Lameter wrote: > On Fri, 3 Oct 2014, Thomas Gleixner wrote: > > > > Is this the way its intended or should the counters be expanded to 64 bit? > > > > There is no reason why we cannot or should not expand them. > > Ok here is a patch to do just that: > > > Subject: Increase irq counters to 64 bit > > > Irq counters can overflow easily if they are just 32 bit. > > For example the timer interrupt occurs 1000 times per second, so > it is predictable that the timer interrupt will overflow in > > > 2^ 32 / 1000 [interrupts per second] / 86400 [seconds in a day] > > which results in 46 days.
dc -e "1 k 2 32 ^ 1000 / 86400 / p" 49.7
(That was the number I remembered from stories about a ancient Windows lockup.)
> Other irq counters for devices may wrap even faster for example > those for high speed networking devices. > > This patch is needed to avoid the counter overflow by increasing > the counters to 64 bit. > > Signed-off-by: Christoph Lameter <cl@linux.com>
Paul Bolle
| |