[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] uptime weirdness
- Subject: [ale] uptime weirdness
- From: kaboom at gatech.edu (Chris Ricker)
- Date: Thu, 28 Aug 2003 11:25:07 -0600 (MDT)
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