Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2002 02:18:11 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        Michael Smith <msmith@FreeBSD.org>
Cc:        smp@FreeBSD.org
Subject:   Re: Interrupt Context becomes a misnomer (was  Re: Core recognizes SMPng tech lead )
Message-ID:  <20020310021811.A30546@iguana.icir.org>
In-Reply-To: <200203080211.g282BAt01492@mass.dis.org>
References:  <200203080211.g282BAt01492@mass.dis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> We should stop doing (almost) anything in "interrupt context".  An 
> interrupt handler should at most:
> 
>  - pacify the interrupting device
>  - make the driver's interrupt thread runnable

definitely a good goal.

For network device drivers, I suspect the least intrusive way
to "pacify" the device would be to mask interrupts off on the
device, and unmask them at the end of the interrupt thread.

Does your suggestion require a separate device callback for
the body of the interrupt thread, different from the
actual interrupt handler ?

	cheers
	luigi

> Now, before you all start screaming about "fast interrupts", yes, there 
> are a few devices that require special treatment.  But there aren't many 
> of them, and they can be accomodated in this model (by doing slightly 
> more in the interrupt handler).
> 
> In the case where a device can't be "pacified" without considerable work 
> (this is fairly rare), the handler can return status indicating that the 
> interrupt should be masked until the thread has run.
> 
> You can turn the concept on it's head and view it as making every driver 
> have a "fast" interrupt handler.  "Slow" handlers go away, making the 
> issue of handling things "in interrupt context" much less of a problem, 
> since almost nothing (clock code notwithstanding) is called from 
> interrupt context.
> 
> This isn't a particularly novel approach; Apple use it, BSD/OS is likely 
> to go this way, and it's strongly encouraged by the IA64 interrupt model. 
> I'm sure that plenty of other systems do things this way as well; I just 
> don't have the research hours to track them down.
> 
> Just food for thought at this stage, but something that anyone working on 
> interrupt handling should take to heart.
> 
> Regards,
> Mike
> 
> - -- 
> To announce that there must be no criticism of the president,
> or that we are to stand by the president, right or wrong, is not
> only unpatriotic and servile, but is morally treasonable to 
> the American public.  - Theodore Roosevelt
> 
> 
> 
> ------- End of Blind-Carbon-Copy

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020310021811.A30546>