Messages in this thread | | | From | (Alan Cox) | Subject | Re: 2.1.125 Show stopper list: Draft | Date | Tue, 13 Oct 1998 02:00:14 +0100 (BST) |
| |
> > 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/
| |