[patch 0/5] [PREEMPT_RT] Changing interrupt handlers from runningin thread to hardirq and back runtime.

From: Esben Nielsen
Date: Fri Jun 02 2006 - 17:21:34 EST


--
Hi,

(I have sent these patches once, but I can't find them on LKML, so I assume they were lost.)

I have made a system such that drivers can be enhanced to easily run in
both hard-irq context and threaded context under PREEMPT_RT (and also
under !PREEMPT_RT, although that is trivial).

- Why:
Because running hard irq handles threaded is a huge overhead and many of the
interrupt handlers already are so small that running them in hard-IRQ context doesn't make much different. By making them changeable runtime make it easy
to do meassurements on latencies and performance.
Furthermore, this system solves the bugs occuring when trying to share a non-threaded (SA_NODELAY) and threaded (new SA_MUST_THREAD flag) irq handlers
on the same irq. Unless one of them is willing to change context, installation
of the last handler will simply fail.

- How:
The basic idea is to let them change their locks to raw_spin_lock from rt_mutex
and back when the change of context is ordered.

I have therefore made 5 patches.

1) The "spin_mutex" (might need another name) which is a lock type which
can safely be changed runtime from raw_spin_lock to rt_mutex and back.
2) A set of changes to the irq system where a new callback to the driver is '
added.
3) Update to my ethernet driver (e100).
4) Update to the my serial driver (8250).
5) A patch which doesn't really belong here to lpptest where the
request_irq() API wasn't used correctly.

Esben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/