lkml.org 
[lkml]   [2001]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] improve spinlock debugging
    Robert Love wrote:
    >
    > On Tue, 2001-12-04 at 15:30, george anzinger wrote:
    >
    > > spin_lockirq
    > >
    > > spin_unlock
    > >
    > > restore_irq
    >
    > Given this order, couldn't we _always_ not touch the preempt count since
    > irq's are off?
    >
    > Further, since I doubt we ever see:
    >
    > spin_lock_irq
    > restore_irq
    > spin_unlock
    >
    > and the common use is:
    >
    > spin_lock_irq
    > spin_unlock_irq
    >
    > Isn't it safe to have spin_lock_irq *never* touch the preempt count?
    >
    NO. The problem is the first example above. The spin_unlock will down
    count, but the spin_lockirq did NOT do the paired up count (been there,
    done that). This is where we need the spin_unlock_no_irq_restore.
    --
    George george@mvista.com
    High-res-timers: http://sourceforge.net/projects/high-res-timers/
    Real time sched: http://sourceforge.net/projects/rtsched/
    -
    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:13    [W:0.024 / U:91.212 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site