This is completely and utterly untrue in SMP environments.
In SMP, there is only _one_ primitive that makes sense, and trust me,
SPL-levels aren't even close. The one primitive that makes sense is
spinlocks with a local disable function (ie disable either interrupts
locally or disable bottom half handling or similar on that one CPU).
Really. The notion of blocking an interrupt (or a group of them) is just
very fundamentally and inherently broken as a synchronization primitive.
And this is true even when the hardware _does_ support SPL-like things.
For example, it's very obvious that intel designed the IO-APIC as being a
"global SPL" thing. It's also very obvious that it's completely
irrelevant, and that they shouldn't even have tried: even if you block
interrupts you have to then synchronize with the other CPU's to make sure
there aren't any already executing interrupt threads.
In essense, even with spl-levels you still end up having to do the
synchronization anyway. As such, you're _much_ better off just forgetting
about spl, and do the synchronization right from the start.
Linus
[ And yes, I'm aware that we don't reasonably scale to tons of CPU's right
now. My point is that I want to head off any stupidity wrt interrupt
handling long before somebody gets too attached to it. Just say NO to
anything but spinlocks when it comes to device driver interactions. ]
-
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/