patch-2.4.4 linux/kernel/sched.c
Next file: linux/kernel/sys.c
Previous file: linux/kernel/pm.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Fri Apr 20 18:26:16 2001
- Orig file:
v2.4.3/linux/kernel/sched.c
- Orig date:
Thu Mar 22 09:20:45 2001
diff -u --recursive --new-file v2.4.3/linux/kernel/sched.c linux/kernel/sched.c
@@ -739,7 +739,7 @@
state = p->state;
if (state & mode) {
WQ_NOTE_WAKER(curr);
- if (try_to_wake_up(p, sync) && curr->flags && !--nr_exclusive)
+ if (try_to_wake_up(p, sync) && (curr->flags&WQ_FLAG_EXCLUSIVE) && !--nr_exclusive)
break;
}
}
@@ -1024,9 +1024,11 @@
int i;
// Substract non-idle processes running on other CPUs.
- for (i = 0; i < smp_num_cpus; i++)
- if (aligned_data[i].schedule_data.curr != idle_task(i))
+ for (i = 0; i < smp_num_cpus; i++) {
+ int cpu = cpu_logical_map(i);
+ if (aligned_data[cpu].schedule_data.curr != idle_task(cpu))
nr_pending--;
+ }
#else
// on UP this process is on the runqueue as well
nr_pending--;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)