lkml.org 
[lkml]   [2004]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: scheduler: IRQs disabled over context switches
    On Sun, May 23, 2004 at 04:04:39PM -0700, Davide Libenzi wrote:
    > On Sun, 23 May 2004, Russell King wrote:
    > > Not quite - look harder. They use spin_unlock_irq in finish_arch_switch
    > > rather than prepare_arch_switch.
    >
    > Hmm, they do indeed. Hmm, if we release the rq lock before the ctx switch,
    > "prev" (the real one) will result not running since we already set
    > "rq->curr" to "next" (and we do not hold "prev->switch_lock").

    We do hold prev->switch_lock - we hold it all the time that the thread
    is running. Consider what prepare_arch_switch() is doing - it's taking
    the next threads switch_lock. It only gets released _after_ we've
    switched away from that thread.

    So I think your analysis is flawed.

    --
    Russell King
    Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
    maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
    2.6 Serial core
    -
    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 14:03    [W:0.358 / U:61.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site