Re: Can't sleep less than 20 ms

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 11 Jul 1999 20:39:12 +0200


Steve Underwood wrote:
> 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.

I am under the impression that the motherboard/legacy hardware/IO-APIC
suck in whatever combinations they occur, but that the modern x86 itself
is ok at handling interrupts -- it can do 500MHz, multi issue etc. after
all and interrupts are not much different than software interrupts used
for system calls.

> > [ And then I'd like to see the accurate timers used for polling network
> > cards under load :-) ]
>
> Ah, a hidden agenda?

Yes, a little thought there about improving network handling. The idea
is that, under load, you refuse to service the network card for a few
100us. Then you check if there's an interrupt pending (the CPU doesn't
get interrupted as such), and if so service the card and wait again ad
infinitum. So poll the card instead of getting hit for every packet.

Needs fast timers first.

> More seriously, timers on demand would be great, but how do you
> achieve portability?

They don't have to be available at fine granularity on all systems do
they? Imagine add_timer() with the option to do high resolution timers
if the hardware can support it. Otherwise good old jiffies based.

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

The PC's timer may suck these days and there's the occasional buggy
chipset, but it does seem reliable. Pentiums have a local cycle-based
timer too.

-- Jamie

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