Re: RT patch acceptance

Esben Nielsen
2005-05-25T11:36:32Z

On Tue, 24 May 2005, john cooper wrote:

> [...]
> I'd like to hear some technical arguments of why IRQ threads
> are held with such suspicion. Also it isn't the case prior
> mechanisms are being obsoleted. Exception context interrupt
> processing and raw_spinlocks to synchronize with them are
> still available and will be for those edge cases which
> are not addressable via spinlock-mutexes.
>

Performance! Even on RT systems you do NOT make all interrupts run in
threads. Simple devices like UARTS run everything in interrupt context.
Introducing a context switch for every character received on such a
channel can be _very_ expensive.

I think it would be safe to convert almost every driver back to run in
exception context and use raw spinlocks for locking accordingly. Very few
driver actually does a lot of work on the interrupt level. Only those
devices high bandwidth and no DMA is a problem (old IDE and ethernet
devices spring to mind).

Therefore a framework where it can be configured per device would be the
ideal solution.

I do not know the structure of the code very well and I do not have any
time to look into it now. But I could imagine kbuild can be set up to
change the relavant between being a mutex and a raw spinlocks depending on
which code runs in exception context or in a thread.

> -john
>
>

Esben