lkml.org 
[lkml]   [2002]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups.

    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/

    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:0.027 / U:30.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site