On Fri, 18 Dec 1998, Linus Torvalds wrote:

> Ehh.. Any interrupt is going to be a _lot_ more costly than a few
> cross-cpu cache misses.
> 
> Your argument goes: if we have lots of interrupts, we may have a number of
> unnecessary re-schedules.
> 
> My argument goes: if we have that many interrupts, we don't care. The cost
> of the idle task re-scheduling a few times unnecessarily is not going to
> matter, and the cost of _not_ doing it is that we potentially run too much
> in the idle task. 

i'm not so sure about this. First, a nonzero part of schedule() is
__cli()-ed, which unnecessarily delays the (already heavy-frequency) 
interrupts. Second, with FASTSWITCH routing we already are in the ~8-10
usecs range on a simple PC per network interrupt, a full schedule() can
take that much on SMP ...

if the frequency of the interrupts is fixed, we are probably OK, because
the reschedule will closely happen after the IRQ. But if another IRQ
occurs in this window, we both might get delayed due to the __cli, and we
might extend the amount we hold non-cli-ed locks like the scheduler lock.

> We could add the test for "current->need_resched" and only call the
> scheduler then. I think Andrea did that. Fell free to send me timings, but
> I don't want to change the scheduler just because somebody _thinks_ it
> makes a difference.

I looked at 2.1.131, there definitely were changes since then, i'll
rethink/retest things with 2.1.132.

-- mingo

-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to