lkml.org 
[lkml]   [2003]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] SMP signal latency fix up.
    From
    Date
    On Fri, 2003-11-07 at 01:45, Ingo Molnar wrote:
    > On Fri, 6 Nov 2003, Mark Gross wrote:
    >
    > > }
    > > - success = 1;
    > > }
    > > -#ifdef CONFIG_SMP
    > > - else
    > > - if (unlikely(kick) && task_running(rq, p) && (task_cpu(p) != smp_processor_id()))
    > > - smp_send_reschedule(task_cpu(p));
    > > -#endif
    > > + success = 1;
    >
    > hm, this i believe is incorrect - you've moved the 'success' case outside
    > of the 'real wakeup' branch.
    >

    Yup, I was confusing myself a bit on the return symantics of
    try_to_wake_up, and the relationship with race between changing
    task->state and scheduling a task off a cpu (the "array" test while
    holding the rq lock.).

    The feeling that this was likely wrong was eating at me all evening and
    then it came to me around 8pm when I was driving my son to some thing.

    > to avoid races, we only want to report success if the thread has been
    > truly placed on the runqueue by this call. The other case (eg. changing
    > TASK_INTERRUPTIBLE to TASK_RUNNING) does not count as a 'wakeup'. Note
    > that if the task was in a non-TASK_RUNNING state then we dont have to kick
    > the process anyway because it's in kernel-mode and will go through the
    > signal return path soon.
    >
    > Ingo



    -
    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:58    [W:0.029 / U:0.392 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site