patch-2.3.49 linux/kernel/sched.c

Next file: linux/lib/Makefile
Previous file: linux/kernel/resource.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.48/linux/kernel/sched.c linux/kernel/sched.c
@@ -228,13 +228,11 @@
 	/*
 	 * We will get here often - or in the high CPU contention
 	 * case. No CPU is idle and this process is either lowprio or
-	 * the preferred CPU is highprio. Try to preemt some other CPU
+	 * the preferred CPU is highprio. Try to preempt some other CPU
 	 * only if it's RT or if it's iteractive and the preferred
 	 * cpu won't reschedule shortly.
 	 */
-	if ((p->avg_slice < cacheflush_time && cpu_curr(best_cpu)->avg_slice > cacheflush_time) ||
-	    p->policy != SCHED_OTHER)
-	{
+	if (p->avg_slice < cacheflush_time || (p->policy & ~SCHED_YIELD) != SCHED_OTHER) {
 		for (i = smp_num_cpus - 1; i >= 0; i--) {
 			cpu = cpu_logical_map(i);
 			if (cpu == best_cpu)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)