[lkml]   [2001]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SMP in 2.4
On Wed, Apr 18, 2001 at 11:08:22AM -0400, Dennis wrote:
> Does 2.4 have something similar to spl levels or does it still require the
> ridiculous MS-DOSish spin-locks to protect every bit of code?

Lets see -- (besides of MSDOS not having any sort of spinlocks), the
spl() is something out of VAX series of machines, and it really works
by presuming that there is some sort of priority leveling among irq

At i386 there is only one level of interrupt control, either you
accept interrupts, or you don't. It just doesn't scale very well.

At FreeBSD site there is no documentation of how to handle interrupts,
presumably that is "read the source, luke".

Ah, found some man-page with its description..

Essentially the supported function for spl() is:

spin_lock_irqsave(&sp->lock, flags);

along with its counterpart ( splx() ):

spin_unlock_irqrestore(&sp->lock, flags);

These block interrupts at the LOCAL processor only (no interprocessor
communication hazzle for it), and the spinlocks are for blocking
interrupt processing by *other* processors at SMP systems.
( Linux does distribute interrupts these days to *all* processors
when APIC is in use, and while it is fast and easy to block IRQ
at local processor, getting other processors also to block IRQs
is major slow thing... )

At UP systems the SAME functions are used, but their internal
implementations are slightly different -- no SMP related spinlock
is operated.

For a model, see drivers/net/eepro100.c

> DB
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:26    [W:0.068 / U:2.832 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site