Messages in this thread | | | Date | Mon, 6 Oct 2014 17:28:47 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: Why do we still have 32 bit counters? Interrupt counters overflow within 50 days |
| |
On Mon, 6 Oct 2014, Christoph Lameter wrote:
> On Mon, 6 Oct 2014, Thomas Gleixner wrote: > > > So if you want to fix that as well, you really need to think about the > > 32 bit case because there is no serialization for the interrupts which > > are delivered directly from their own vector. And no, we should not > > diverge 32 and 64 bit artificially here simply because the same 50 > > days wrap applies to both. > > Is it a divergence if both 64bit and 32 bit are unsing unsigned long?
Sigh, yes. Because unsigned long is 32bit on a 32bit architecture. So the change would be NOP for 32bit and 32bit would still suffer from the wrap arounds etc.
> > > > I really start to wonder whether all this is worth the trouble. It has > > been this way forever and 1k timer interrupts per second is not really > > a new thing either. So we did not change anything which suddenly makes > > tools confused. > > Tools expect the number of interrupt to increase linearly and not jump by > 2^32 once in awhile. There are functions in the kernel (/proc/stat) that > sum up various interrupt counters and that are types unsigned long. These > larger numbers can suddenly jump by 2^32. Its pretty unusual for a 64 bit > conter to do that and it requires some head scratching until we figured > that one out.
I understand that, I just wonder why nobody noticed before. It's been that way forever :)
Thanks,
tglx
| |