Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs commit: src/sys/i386/isa rc.c

>Note that this patch really points to a problem in DELAY(X) for X
>smaller than 20.  Right now the DELAY code does an X=-20 and never
>really goes into the DELAY loop.

>It seems that on 133Mhz and faster Pentium systems the assumed overhead
>time of 20uS is no longer valid and something needs to be done to
>correct this.  This is especially true when calling short DELAY's in
>a loop since that all ends up running from the internal cache.

>If you spot DELAY being called in an loop some place with values of
>20 or below I suggest that the code be corrected to do what I did here
>or we are going to see more of these types of problems as system
>speeds increase.

Very short delays should only have been used when the precise delay
isn't critical.  It isn't practical to guarantee a maximum delay
(slow machines take several usec just to call DELAY(), and interrupts
may extend the delay for several thousand usec).  Perhaps DELAY()
should guarantee a minimal delay.  This would make all the stupid
timeout loops with DELAY(SMALL) give huge timeouts on slow machines