[lkml]   [2004]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2.6.6-rc3-mm1
    On Fri, 30 Apr 2004 01:46:58 -0700, 
    Andrew Morton <> wrote:
    > Rework the spinlock code so that architectures can reenable interrupts when
    > spinning in spin_lock_irq() or spin_lcok_irqsave(). Only implemented for
    > ia64 at this stage.

    Only spin_lock_irqsave(), not spin_lock_irq(). The patch needs the old
    flags to determine if interrupts were originally enabled, the flags are
    not saved for spin_lock_irq().

    In theory, spin_lock_irq() should never be called when interrupts are
    already disabled, the corresponding spin_unlock_irq() will
    unconditionally enable interrupts. So it should be possible for
    spin_lock_irq() to pass a constant flags value to
    _raw_spin_lock_flags(), stating that interrupts were enabled before
    spin_lock_irq(). Two problems with that :-

    * The flags value for 'interrupts were enabled' is arch specific.

    * I have seen buggy code that does spin_lock_irq() when interrupts
    are already disabled. Unconditionally enabling interrupts while
    waiting for a contended spin_lock_irq() will perturb that code.

    For now, the patch only improves the performance of spin_lock_irqsave().

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:02    [W:0.019 / U:155.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site