Re: [PATCH] SMP signal latency fix up.

From: Ingo Molnar
Date: Fri Nov 07 2003 - 17:50:55 EST



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.

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/