[lkml]   [2000]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: DAC960 SMP deadlock fix
    On Thu, 7 Sep 2000, Andi Kleen wrote:

    >On Thu, Sep 07, 2000 at 09:00:29AM -0700, Leonard N. Zubkoff wrote:
    >> WaitQueue_T WaitQueueEntry = { current, NULL };
    >> add_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
    >> current->state = TASK_UNINTERRUPTIBLE;
    >> spin_unlock(&io_request_lock);
    >> schedule();
    >> current->state = TASK_RUNNING;
    >> remove_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
    >> spin_lock_irq(&io_request_lock);
    >> Is the fix simply moving the spin_unlock right before the call to
    >> add_wait_queue?
    >When you do that you should probably change it to a spin_unlock_irq()

    I didn't changed that because not doing __sti() is faster, because
    schedule() waste time doing an __sti() unconditionally. By the time we'll
    remove sti() from schedule() we'll add a debugging code that check the IF
    in the CPU is disabled and that BUG in that case (and that won't happen
    before 2.5.x when all the sleep_on will die).

    However if you want to replace it with a spin_unlock_irq(&io_request_lock)
    in prevision to the possible removal of sti() from schedule() go ahead :).
    It's just not necessary right now (and I only addressed the deadlock
    condition with the patch).


    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 12:38    [W:4.037 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site