lkml.org 
[lkml]   [1998]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.1.125 Show stopper list: Draft
Date
> >   Jiffy Handling
> > Many drivers still do not handle jiffy overflows nicely
>
> Alan, should we consider this really a bug? I think that to only _clean_
> way to fix this problem would be to use a long long C type for jiffies
> (decreasing performance). But decreasing performance is needed also to
> catch the overflow...

It is a bug. The only drivers that should have a problem are those that
need to execute 250 day delay loops. Now I grant an NCR5380 is slow but
its not that slow...

There are also macros in the kernel tree now for time comparison with wrap
around protection. Basically it uses a tcp like scheme so that the low 32bits
are used for a 31bit relative range.

So instead of

x=jiffes+HZ/5
while(jiffies<x)
{
if(it_worked())
break;
}
You do

x=jiffies+HZ/5

while(time_before(jiffies,x))
{
...
and the end result is safe over the 498 day timer. And yes I consider
this an issue...

2:31am up 482 days, 6:24, 1 user, load average: 0.09, 0.08, 0.08

Alan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site