• Ingo Molnar's avatar
    [PATCH] irqlock patch 2.5.27-H6 · a6efb709
    Ingo Molnar authored
     - init thread needs to have preempt_count of 1 until sched_init().
       (William Lee Irwin III)
     - clean up the irq-mask macros. (Linus)
     - add barrier() to irq_enter() and irq_exit(). (based on Oleg Nesterov's
       comment.)
     - move the irqs-off check into preempt_schedule() and remove
       CONFIG_DEBUG_IRQ_SCHEDULE.
     - remove spin_unlock_no_resched() and comment the affected places more
       agressively.
     - slab.c needs to spin_unlock_no_resched(), instead of spin_unlock(). (It
       also has to check for preemption in the right spot.) This should fix
       the memory corruption.
     - irq_exit() needs to run softirqs if interrupts not active - in the
       previous patch it ran them when preempt_count() was 0, which is
       incorrect.
     - spinlock macros are updated to enable preemption after enabling
       interrupts. Besides avoiding false positive warnings, this also
     - fork.c has to call scheduler_tick() with preemption disabled -
       otherwise scheduler_tick()'s spin_unlock can preempt!
     - irqs_disabled() macro introduced.
     - [ all other local_irq_enable() or sti instances conditional on
         CONFIG_DEBUG_IRQ_SCHEDULE are to fix false positive warnings. ]
     - fix buggy in_softirq(). Fortunately the bug made the test broader,
       which didnt result in algorithmical breakage, just suboptimal
       performance.
     - move do_softirq() processing into irq_exit() => this also fixes the
       softirq processing bugs present in apic.c IRQ handlers that did not
       test for softirqs after irq_exit().
     - simplify local_bh_enable().
    a6efb709
grip.c 11.1 KB