[ale] uptime weirdness
Chris Ricker
kaboom at gatech.edu
Thu Aug 28 13:25:07 EDT 2003
On Thu, 28 Aug 2003 hbbs at comcast.net wrote:
> Jim -
>
> I started playing around with powers of two to see if any of them came close to
> the number of seconds in 500 days.
>
> 2^26 is closest, but not close enough to suggest there was a rollover.
jiffies are an unsigned long (see kernel/timers.c) and are incremented every
1/100th of a second on Intel (normally)
2^32 / 86400 / 100 = 497.1027
As a result, jiffies wrap after 497.1 or so days on 32-bit hardware. Since
uptime was calculated from jiffies, uptime also wrapped.
That's not a serious problem, but drivers sometimes use jiffies as a
counter, and those get weird. They're supposed to have all been audited,
but....
later,
chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list