Re: Can't sleep less than 20 ms

Peter Allen (P.Allen@pallen.dabsol.co.uk)
Tue, 20 Jul 1999 22:31:01 +0100


>> HZ == 1000 looks like yet another arbitrary decision. Why is 1000Hz
>> good enough yet 100Hz is not?
>
>1000Hz or better yet 1024Hz is a good decision because it is the right
>granularity for handling human perception limits. Ie its the right kind
>of resolution for games.
>
>> Do you really want to spend 1% CPU servicing timer interrupts just so
>> _occasionally_ a program can get a short sleep to 2ms accuracy?
>
>On a modern machine (ie reasonable 486+ its definitely a non issue).One
>option would be to use 1024Hz on kernels for 586+.
>
>> - slow HZ -- low interrupt load
>> - accurate timers on demand
>> - *precise* timing with accuracy of hardware
>
>We have extremely precise timing, to the microsecond level and beyond.
>That is different to sleep resolution (tho note that for tiny values its
>not worth the effort of sleeping)
>
>-

I presume that this would mean changing jiffies to a long long,
otherwise
it would only work for 48 and a bit days before overflowing.
(What happens when jiffies overflows?)

Peter Allen

-
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/