Re: [PATCH *] use 64 bit jiffies

From: Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Date: Tue Feb 04 2003 - 03:41:31 EST


On 4 February 2003 10:27, Robert de Bath wrote:
> On Tue, 4 Feb 2003, Denis Vlasenko wrote:
> > Jiffy Wrap Bugs
> >
> > There were reports of machines hanging on jiffy wrap.
> > This is typically a result of incorrect jiffy use in some driver.
> > Ask Tim - he is hunting those problems regularly, but he is
> > outnumbered by buggy driver authors. :(
> >
> > There is a better solution to ensure correct jiffy wrap handling in
> > *ALL* kernel code: make jiffy wrap in first five minutes of uptime.
> > Tim has a patch for such config option. This is almost right.
> > This MUST NOT be a config option, it MUST be mandatory in every
> > kernel. Driver writers would be bitten by their own bugs and will
> > fix it themself. Tim, what do you think?
>
> How about an option, either the jiffy timer wraps at 5 minutes or
> process 1 gets sent a SIGINT after 24 hours ? That way a driver
> with an MIA author can still be used even if it's buggy, just not
> for very long.

I prefer buggy driver be fixed ASAP. The first step is to know
that there *is* a (jiffywize-) buggy driver or something.

Jiffie wrap at 5 mins is done this way: jiffies is initialized to -5*60*HZ
instead of zero at boot. Accounting code is adjusted e.g. not to show 400+
days uptime (it subtracts -5*60*HZ from jiffies).

Jiffies wraps to zero in five minutes. Box should survive with no probs.
If it instead hangs, oops or otherwise feeling bad, you have a jiffy wrap
bug somewhere.

Today you need to wait 400 or so days before you can test what will happen.
Production servers' admins getting a bit nervous close to that date ;)

A nice printk "Timer code check..." at jiffies = -30*HZ
and "...timer code check passed" at jiffies = 30*HZ will let us have
good bug reports ("what was your last log message?") and would not
scare people. "A jiffie would wrap in 5 seconds!" is not that good -
please do not unnecessarily scare new users ;)

--
vda
-
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 : Fri Feb 07 2003 - 22:00:14 EST