Re: [timer] max timeout

2001-05-25 Thread Horst von Brand

Mark Frazer <[EMAIL PROTECTED]> said:

[...]

> The output of `find . -type f | xargs grep 'jiffies +'` would suggest
> that there are a few latent bugs as jiffies grows to values near the
> top of its range.  I guess this hasn't turned up as 0x7fff / (100 *
> 3600 * 24) = 248.55.

There were patches floating around a _long_ time ago (2.1-ish AFAIR) that
allowed you to start your system at any jiffy. Many people checked out what
happens on jiffie rollover then. Might be a good idea to do that again...
-- 
Dr. Horst H. von Brand   mailto:[EMAIL PROTECTED]
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria  +56 32 654239
Casilla 110-V, Valparaiso, ChileFax:  +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-25 Thread sebastien person

Le Wed, 23 May 2001 16:58:15 +0200 (MET DST)
Andrzej Krzysztofowicz <[EMAIL PROTECTED]> a ecrit :

> "sebastien person wrote:"
> > Is it bad to do the following call ?
> > 
> > mod_timer(, jiffies+(0.1*HZ));
> 
> Yes, it is bad. Don't use floating point in the kernel if you don't
need.

So, there is a good solution to fire the timer after 100 ms ?
And is there any max limitation on the expires value ?

e.g. what is the biggest time period we could have between timer call and
the execution of the timer function ?



> 
> > that might fire the timer 1/10 second later.
> 
> HZ/10 is much better ...
> 
> -- 
> ===
>   Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
>   phone (48)(58) 347 14 61
> Faculty of Applied Phys. & Math.,   Technical University of Gdansk
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-25 Thread sebastien person

Le Wed, 23 May 2001 16:58:15 +0200 (MET DST)
Andrzej Krzysztofowicz [EMAIL PROTECTED] a ecrit :

 sebastien person wrote:
  Is it bad to do the following call ?
  
  mod_timer(timer, jiffies+(0.1*HZ));
 
 Yes, it is bad. Don't use floating point in the kernel if you don't
need.

So, there is a good solution to fire the timer after 100 ms ?
And is there any max limitation on the expires value ?

e.g. what is the biggest time period we could have between timer call and
the execution of the timer function ?



 
  that might fire the timer 1/10 second later.
 
 HZ/10 is much better ...
 
 -- 
 ===
   Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
   phone (48)(58) 347 14 61
 Faculty of Applied Phys.  Math.,   Technical University of Gdansk
 -
 To unsubscribe from this list: send the line unsubscribe linux-kernel
in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-25 Thread Horst von Brand

Mark Frazer [EMAIL PROTECTED] said:

[...]

 The output of `find . -type f | xargs grep 'jiffies +'` would suggest
 that there are a few latent bugs as jiffies grows to values near the
 top of its range.  I guess this hasn't turned up as 0x7fff / (100 *
 3600 * 24) = 248.55.

There were patches floating around a _long_ time ago (2.1-ish AFAIR) that
allowed you to start your system at any jiffy. Many people checked out what
happens on jiffie rollover then. Might be a good idea to do that again...
-- 
Dr. Horst H. von Brand   mailto:[EMAIL PROTECTED]
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria  +56 32 654239
Casilla 110-V, Valparaiso, ChileFax:  +56 32 797513
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-23 Thread Andrzej Krzysztofowicz

"sebastien person wrote:"
> Is it bad to do the following call ?
> 
>   mod_timer(, jiffies+(0.1*HZ));

Yes, it is bad. Don't use floating point in the kernel if you don't need.

> that might fire the timer 1/10 second later.

HZ/10 is much better ...

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-23 Thread Andi Kleen

On Wed, May 23, 2001 at 04:28:01PM +0200, sebastien person wrote:
> Is it bad to do the following call ?
> 
>   mod_timer(, jiffies+(0.1*HZ));

Yes very bad. gcc will generate a floating point add for that, corrupting
the user process' floating point context. 


-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[timer] max timeout

2001-05-23 Thread sebastien person

Hi,

is there a max timeout to respect when I use mod_timer ? or add_timer ?

Is it bad to do the following call ?

mod_timer(, jiffies+(0.1*HZ));

that might fire the timer 1/10 second later.

Thanks.

sebastien person
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[timer] max timeout

2001-05-23 Thread sebastien person

Hi,

is there a max timeout to respect when I use mod_timer ? or add_timer ?

Is it bad to do the following call ?

mod_timer(timer, jiffies+(0.1*HZ));

that might fire the timer 1/10 second later.

Thanks.

sebastien person
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-23 Thread Andi Kleen

On Wed, May 23, 2001 at 04:28:01PM +0200, sebastien person wrote:
 Is it bad to do the following call ?
 
   mod_timer(timer, jiffies+(0.1*HZ));

Yes very bad. gcc will generate a floating point add for that, corrupting
the user process' floating point context. 


-Andi

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-23 Thread Andrzej Krzysztofowicz

sebastien person wrote:
 Is it bad to do the following call ?
 
   mod_timer(timer, jiffies+(0.1*HZ));

Yes, it is bad. Don't use floating point in the kernel if you don't need.

 that might fire the timer 1/10 second later.

HZ/10 is much better ...

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/