Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2002 02:37:27 -0800
From:      Michael Smith <msmith@freebsd.org>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        Michael Smith <msmith@FreeBSD.org>, smp@FreeBSD.org
Subject:   Re: Interrupt Context becomes a misnomer (was Re: Core recognizes SMPng tech lead ) 
Message-ID:  <200203101037.g2AAbRj03482@mass.dis.org>
In-Reply-To: Your message of "Sun, 10 Mar 2002 02:18:11 PST." <20020310021811.A30546@iguana.icir.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.

This depends a lot on the architecture of the device; one development that
would help a great deal would be a lockless, mp-safe queue primitive.

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

The implementation I envisage has one thread per interrupt vector, 
invoking each interrupt handler registered for the vector.

In the "default" case, no actual interrupt handler is installed; the 
default behaviour is to mask the interrupt and make the thread runnable 
(very similar to our current behaviour).

Allowing a driver to register an actual interrupt-context-handler is an 
optimisation that provides the functionality of 'fast' handlers as well 
as potentially improved system responsiveness by not masking the 
interrupt for a length of time.  The usual drawbacks with masked vectors,
shared interrupts and fast handlers, of course still apply.

 = 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



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?200203101037.g2AAbRj03482>