lkml.org 
[lkml]   [1998]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Today Linus redesigns the networking driver interface (was Re: tulip driver in ...)
   Date: 	Sat, 19 Sep 1998 13:35:21 -0700 (PDT)
From: Linus Torvalds <torvalds@transmeta.com>

SPL's are just completely braindamaged. Linux does the only sane thing,
which is to force all interrupts to be single-threaded on a per-interrupt
basis (ie the same interrupt cannot re-enter itself), but otherwise
independent of each other.

The whole notion of "interrupt priority" is just completely broken. There
is no such thing.

Note that all of the post-BSD 4.4 implementations have abandoned SPL's
as having any kind of semantics related to priority. They just keep the
name SPL for historical reasons.

The one thing which the BSD implementations have that we *don't* have is
the ability mask just one kind of interrupts (say, serial or networking
interrupts) during some critical section of code. The only thing we can
do is use cli(), which blocks all interrupts.

So one of the things which the BSD networking stack can do is to (in
some critical section of code), prevent network interupts from being
handled. If a network interrupt comes in during the critical section of
code, it is queued, and would be executed only after the networking code
had unblocked network interrupts. (However, if a disk interrupt
happened during the critical section, it would be handled.)

In practice, the lack of this ability to defer only interrupts from a
single class of devices hasn't been that much of a problem. It does
mean that device driver writers have to be very careful not to leave
interrupts turned off for too long, since a driver which decides to mask
all interrupts for too long might adversely affect the behaviour of
another driver.

- Ted

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

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