Re: jiffies rollover, uptime etc.

From: george anzinger (george@mvista.com)
Date: Wed Feb 20 2002 - 11:50:32 EST


Bill Davidsen wrote:
>
> On Tue, 19 Feb 2002, george anzinger wrote:
>
> > Bill Davidsen wrote:
> > >
> > > On Mon, 18 Feb 2002, Ben Greear wrote:
>
> > > > Does this problem still exist on 64-bit machines?
> > >
> > > Absolutely. But not as often ;-)
> >
> > Actually you will have a VERY hard time getting it to roll over. Issues
> > of your life time, not to mention the hardware's life time. 64 bits
> > makes a VERY large number and you are counting in 427 day increments.
> > Remember we have been counting seconds since 1970 in 32 bits and
> > rollover is still, most likely, beyond the capability of any machine
> > running today to get to. Now consider counting in 427 day increments
> > instead of seconds.
>
> Um, note the odd characters appended to my sentence ";-)" which means
> "not serious here, look for joke, sarcasm, over or understatement.
>
Ok, I guess I just got so impressed with the size of a 64-bit value that
I was overwhelmed. Consider, for example:

        u64 i;
        for (i = 1; i != 0; i++);

Now in theory this will count each possible number, but in practice the
machine will die long before it ever finishes.
        

-- 
George           george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:25 EST