]> err.no Git - linux-2.6/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)
commit60a6c3777ec607c5b19df9eac35088db4e142a6b
tree8f4a680f4667ac4698dfd80bd4ccd79a34f10b19
parent7fdeb048141b363a23b8cf6f6a226d74aca4d724
[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