Messages in this thread | ![/](/images/icornerl.gif) | | Date | Fri, 7 Nov 2003 10:45:59 +0100 (CET) | From | Ingo Molnar <> | Subject | Re: [PATCH] SMP signal latency fix up. |
| |
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |