Re: Preempt & how long it takes to interrupt (was Re: [2.4.17/18pre] VM and swap - it's really unusable)

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Jan 27 2002 - 15:37:19 EST


> >carefully disables an IRQ on the card so that it can avoid spinlocking on
> >uniprocessor boxes.
>
> Sounds like a bit of a kludge, but it's not my code. However, without
> preempt aren't spinlocks basically NOPs on uniprocessor boxes? What did I
> miss?

spin lock is a nop on uniprocessor. That is much of the point of this. Most
ne2000's are in uniprocessor boxes so they are primary target

> An NE2K cannot go faster than 10baseT. (Never designed to. It's an old ISA

Wrong. There are multiple 100Mbit NE2000 clones (notably PCMCIA ones). I
have one in my laptop for example.

> testing the patch complaining about, AND one that seems like it could be
> addressed by using IRQ disabling as a latency guard in addition to spinlocks.

I dont believe anyone has tested the driver hard with pre-empt. Its not that
this driver can't be fixed. Its that this is one tiny example of maybe
thousands of other similar flaws lurking. There is no obvious automated way
to find them either.

> If it's holding the lock for several miliseconds, the overhead of acquiring
> the lock in the first place isn't exactly a show-stopper, is it?

I don't hold the lock with interrupts off for several milliseconds

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:45 EST