[lkml]   [2000]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: new IRQ scalability changes in 2.3.48

    On Tue, 14 Mar 2000, Andrea Arcangeli wrote:

    > On Mon, 13 Mar 2000, Jamie Lokier wrote:
    > >Note: In many cases, spinlock_irqsave doesn't need to do the
    > >spinlock_depth thing on UP. [..]
    > It doesn't need that in SMP either.
    > >[..] However, not all cases: the code in the
    > >lock region might wake up another task.
    > If you wakeup another task you don't risk to get rescheduled before you
    > drop the lock.

    What Jamie is referring to is:

    spin_lock_irqsave(a); /* No-op - no counter increment */
    spin_lock(b); /* count = 1 */
    spin_lock_irqsave(runqueue_list); /* no-op */
    .. wakeup, current->need_resched = 1;
    spin_unlock_irqsave(runqueue_list); /* no-op */
    spin_unlock(b); /* Decrement, count = 0; !!!! BOOM !!!!! */

    so IF you check for "needs_resched" after a spin_unlock(), then you can't
    do the simple and efficient optimization I was talking about, because the
    counters are not really precise - they rely on interrupts not happening.

    Problems like this is why I'm a big believer in NOT overdesigning things.
    Keep it simple and STUPID, and you'll live a healthy long life. And let's
    not mess with SMP.


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

     \ /
      Last update: 2005-03-22 13:57    [W:0.019 / U:18.228 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site