Messages in this thread | | | Date | Sat, 10 Jul 1999 00:27:27 +0000 | From | Steve Underwood <> | Subject | Re: Can't sleep less than 20 ms |
| |
Jamie Lokier wrote:
> Rogier Wolff wrote: > > IA32 should also use HZ=1000. However, the API (now cast in stone) > > specifies that HZ == 100 when seen from userland. Linus has suggested > > that the kernel-HZ need not be the same as what is "published" to the > > user applications. > > HZ == 1000 looks like yet another arbitrary decision. Why is 1000Hz > good enough yet 100Hz is not?
100Hz is not quite fast enough to achieve a quality of flow in multi-media apps that a human considers smooth. 1000Hz is.
> x86 also takes 10 or more microseconds to service an interrupt (it is > said because of motherboards not the CPU itself).
I don't believe its the motherboards. All the way back to the 8086/8088 (and even the 8080/80805) the Intel processors have hit the snooze button when an interrupt appears. No modern fast, cached, pipelined processor is going to like the disturbance caused by an interrupt, but the x86 has always done a much worse job than is possible.
> Do you really want to spend 1% CPU servicing timer interrupts just so > _occasionally_ a program can get a short sleep to 2ms accuracy? > > I'd rather see: > > - slow HZ -- low interrupt load > - accurate timers on demand > - *precise* timing with accuracy of hardware > > [ And then I'd like to see the accurate timers used for polling network > cards under load :-) ]
Ah, a hidden agenda? More seriously, timers on demand would be great, but how do you achieve portability? Scheduling is such a basic function I think every modern processor should have an effective fine grained scheduling timer built in. None do. The timers that exist seem between difficult and impossible to use in a 100% reliable manner.
Steve
- 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/
| |