summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /kernel/sched.c
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (diff)
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 38e792167..2f35e928a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -233,7 +233,7 @@ static void reschedule_idle(struct task_struct * p, unsigned long flags)
* its preferred CPU. (this is a shortcut):
*/
tsk = cpu_curr(best_cpu);
- if (preemption_goodness(tsk, p, best_cpu) > 1)
+ if (preemption_goodness(tsk, p, best_cpu) > 0)
goto preempt_now;
}
@@ -290,7 +290,7 @@ send_now_idle:
* altogether, tsk->need_resched is actively watched by the
* idle thread.
*/
- if (!tsk->need_resched)
+ if ((tsk->processor != current->processor) && !tsk->need_resched)
smp_send_reschedule(tsk->processor);
tsk->need_resched = 1;
spin_unlock_irqrestore(&runqueue_lock, flags);
@@ -436,10 +436,7 @@ signed long schedule_timeout(signed long timeout)
add_timer(&timer);
schedule();
- del_timer(&timer);
- /* RED-PEN. Timer may be running now on another cpu.
- * Pray that process will not exit enough fastly.
- */
+ del_timer_sync(&timer);
timeout = expire - jiffies;