2005-05-18 10:12:36

by linux

[permalink] [raw]
Subject: 2.6 jiffies

Why jiffies start counting from a negative number and after 5minutes the
counter gets positive????


2005-05-18 10:25:18

by Arjan van de Ven

[permalink] [raw]
Subject: Re: 2.6 jiffies

On Wed, 2005-05-18 at 13:12 +0300, linux wrote:
> Why jiffies start counting from a negative number and after 5minutes the
> counter gets positive????

to find bugs in broken drivers who think jiffies doesn't wrap or has an
absolute value...


2005-05-18 10:28:55

by linux

[permalink] [raw]
Subject: Re: 2.6 jiffies

ok.i see what u mean.
But should this value on a stable version be 0 again???

2005-05-18 10:32:39

by Arjan van de Ven

[permalink] [raw]
Subject: Re: 2.6 jiffies

On Wed, 2005-05-18 at 13:28 +0300, linux wrote:
> ok.i see what u mean.
> But should this value on a stable version be 0 again???

why?
"the absolute value has no meaning" -> why would "0" be special ???
Answer: It's not. And actually -5 minutes is more useful than 0 because
it keeps helping finding bugs... why do you want it to start at 0 ?


2005-05-18 10:33:36

by Con Kolivas

[permalink] [raw]
Subject: Re: 2.6 jiffies

On Wed, 18 May 2005 20:12, linux wrote:
> Why jiffies start counting from a negative number and after 5minutes the
> counter gets positive????

It's an excellent way to test if jiffy wrap is handled well since it will
happen in 5 minutes instead of 50 days.

Cheers,
Con


Attachments:
(No filename) (272.00 B)
(No filename) (189.00 B)
Download all attachments

2005-05-18 10:42:47

by Coywolf Qi Hunt

[permalink] [raw]
Subject: Re: 2.6 jiffies

On 5/18/05, Arjan van de Ven <[email protected]> wrote:
> On Wed, 2005-05-18 at 13:28 +0300, linux wrote:
> > ok.i see what u mean.
> > But should this value on a stable version be 0 again???
>
> why?
> "the absolute value has no meaning" -> why would "0" be special ???
> Answer: It's not. And actually -5 minutes is more useful than 0 because
> it keeps helping finding bugs... why do you want it to start at 0 ?
>


The negative value doesn't hurt. It's unsigned. Maybe he was thinking
reading jiffies as the uptime directly.
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/