Messages in this thread | | | Subject | Re: Can't sleep less than 20 ms | Date | Sun, 18 Jul 1999 20:22:27 +0100 (BST) | From | Alan Cox <> |
| |
> 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)
- 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/
| |