Messages in this thread | | | Date | Fri, 3 Oct 2014 04:45:08 -0500 (CDT) | From | Christoph Lameter <> | Subject | Why do we still have 32 bit counters? Interrupt counters overflow within 50 days |
| |
struct irq_desc still has
unsigned int irq_count;
A timer interrupt occurs 1000 times per second and there are 86400 seconds in a day. There is a counter for the local timer interrupt that needs to be continually incremented.
So the counter will overflow in
2^32 / 1000 / 86400 = 46 days
Diagnostic tools will be surprised by the counters suddenly going back to zero. There may be other interrupt sources that also occur quite often.
Is this the way its intended or should the counters be expanded to 64 bit?
64 bit would last for our lifetime.
| |