mirror of https://github.com/BOINC/boinc.git
- client: fix scheduling bug.
The round-robin simulation wasn't handling multithread jobs correctly. For example, given two 3-CPU jobs, it would model running them together on a 4-CPU host. This doesn't correspond with the CPU scheduler, which runs only 1 at a time. So the simulator would say that there are no idle CPUs when in fact there are, and no new CPU jobs would be fetched. svn path=/trunk/boinc/; revision=22801
This commit is contained in:
parent
b103ada0e4
commit
5c2636b743
|
@ -8596,3 +8596,16 @@ Charlie 2 Dec 2010
|
|||
PostInstall.cpp
|
||||
release_boinc.sh
|
||||
WaitPermissions.cpp
|
||||
|
||||
David 2 Dec 2010
|
||||
- client: fix scheduling bug.
|
||||
The round-robin simulation wasn't handling multithread jobs correctly.
|
||||
For example, given two 3-CPU jobs,
|
||||
it would model running them together on a 4-CPU host.
|
||||
This doesn't correspond with the CPU scheduler,
|
||||
which runs only 1 at a time.
|
||||
So the simulator would say that there are no idle CPUs
|
||||
when in fact there are, and no new CPU jobs would be fetched.
|
||||
|
||||
client/
|
||||
rr_sim.cpp
|
||||
|
|
|
@ -290,7 +290,7 @@ void CLIENT_STATE::rr_simulation() {
|
|||
}
|
||||
} else {
|
||||
p->cpu_pwf.has_runnable_jobs = true;
|
||||
if (p->cpu_pwf.sim_nused < ncpus) {
|
||||
if (p->cpu_pwf.sim_nused + rp->avp->avg_ncpus <= ncpus) {
|
||||
sim_status.activate(rp, 0);
|
||||
p->rr_sim_status.activate(rp);
|
||||
} else {
|
||||
|
@ -447,9 +447,9 @@ void CLIENT_STATE::rr_simulation() {
|
|||
}
|
||||
} else {
|
||||
while (1) {
|
||||
if (pbest->cpu_pwf.sim_nused >= ncpus) break;
|
||||
RESULT* rp = pbest->rr_sim_status.get_pending();
|
||||
if (!rp) break;
|
||||
if (pbest->cpu_pwf.sim_nused + rp->avp->avg_ncpus > ncpus) break;
|
||||
sim_status.activate(rp, sim_now-now);
|
||||
pbest->rr_sim_status.activate(rp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue