]> git.baikalelectronics.ru Git - kernel.git/commit
[MIPS] Reduce race between cpu_wait() and need_resched() checking
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Wed, 7 Jun 2006 16:09:01 +0000 (01:09 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 27 Sep 2006 12:37:40 +0000 (13:37 +0100)
commit5263001f7c600eb133d1cd83f56f9cb0cf3fb357
tree8f4a680f4667ac4698dfd80bd4ccd79a34f10b19
parent3e852aad7f78adbe90559aa218293f112292ec9b
[MIPS] Reduce race between cpu_wait() and need_resched() checking

If a thread became runnable between need_resched() and the WAIT
instruction, switching to the thread will delay until a next interrupt.
Some CPUs can execute the WAIT instruction with interrupt disabled, so
we can get rid of this race on them (at least UP case).

Original Patch by Atsushi with fixing up for MIPS Technology's cores by
Ralf based on feedback from the RTL designers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cpu-probe.c