Re: [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups.

From: Ingo Molnar (mingo@elte.hu)
Date: Sun Jul 21 2002 - 18:50:57 EST


On Sun, 21 Jul 2002, george anzinger wrote:

> > > - to remove the preemption count increase/decrease code from the lowlevel
> > > IRQ assembly code.
>
> IMHO this is unwise as the system NEEDS to exit to user (or
> system) space when preempt_count is zero with a garuntee
> that TIF_NEED_RESCHED is 0. [...]

my comment was too compact - the bumping of the preemption count did not
get removed, it's just the dualness that got removed. Both the lowlevel
entry code and the irq_enter() code used to do the same thing - now only
irq_enter() does it.

in the latest patch irq_enter() is done early in do_IRQ(), and irq_exit()
is done before returning from do_IRQ().

> [...] To do this from irq.c means that it must exit with interrupts off
> and the the low level code needs to keep them off till the irtn. [...]

yes, we are very careful to keep irqs disabled in do_IRQ(), both before
and after calling the handler.

> [...] But this is where we test TIF_NEED_RESCHED, and if it is set,
> schedule() is called and should be called with preempt_count != 0, to
> avoid stack overflow interrupt loops. And, schedule() returns with the
> interrupt system on (even if we, unwisely, call it with it off).

yes, in this case schedule() is called with a nonzero preempt count
(PREEMPT_ACTIVE), to keep it from recursing into itself.

> > It seems to me that call to irq_enter() must be shifted from
> > handle_IRQ_event() to do_IRQ().
>
> Even then...

could you check out the latest patch, can you still see any hole in it?
All the above scenarios should be handled correctly.

        Ingo

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



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:36 EST