- client: fix job scheduler problem:

old: RR simulation marks some jobs as missing their deadline,
        and the job scheduler runs those jobs as "high priority".
    problem: those generally aren't the ones we should run.
        E.g. if the client has a lot of jobs from a project,
        typically the ones with later deadlines are the ones
        whose deadlines are missed in the simulation.
        But in this case the EDF policy says we should run
        the ones with earliest deadlines.
    new: if a project has N deadline misses,
        run its N earliest-deadline jobs,
        regardless of whether they missed their deadline in the sim.
    Note: this is how it used to be (as designed by John McLeod).
        I attempted to improve it, and got it wrong.


svn path=/trunk/boinc/; revision=25188
This commit is contained in:
David Anderson 2012-02-02 17:05:55 +00:00
parent 3b969546af
commit b36779b22a
2 changed files with 20 additions and 9 deletions

View File

@ -1256,3 +1256,22 @@ Charlie 2 Feb 2012
/ /
configure.ac configure.ac
version.h version.h
David 2 Feb 2012
- client: fix job scheduler problem:
old: RR simulation marks some jobs as missing their deadline,
and the job scheduler runs those jobs as "high priority".
problem: those generally aren't the ones we should run.
E.g. if the client has a lot of jobs from a project,
typically the ones with later deadlines are the ones
whose deadlines are missed in the simulation.
But in this case the EDF policy says we should run
the ones with earliest deadlines.
new: if a project has N deadline misses,
run its N earliest-deadline jobs,
regardless of whether they missed their deadline in the sim.
Note: this is how it used to be (as designed by John McLeod).
I attempted to improve it, and got it wrong.
client/
cpu_sched.cpp

View File

@ -471,22 +471,14 @@ static RESULT* earliest_deadline_result(int rsc_type) {
if (rp->non_cpu_intensive()) continue; if (rp->non_cpu_intensive()) continue;
PROJECT* p = rp->project; PROJECT* p = rp->project;
bool only_deadline_misses = true;
// treat projects with DCF>90 as if they had deadline misses // treat projects with DCF>90 as if they had deadline misses
// //
if (p->duration_correction_factor < 90.0) { if (p->duration_correction_factor < 90.0) {
int d = p->rsc_pwf[rsc_type].deadlines_missed_copy; if (p->rsc_pwf[rsc_type].deadlines_missed_copy <= 0) {
if (!d) {
continue; continue;
} }
} else {
only_deadline_misses = false;
} }
if (only_deadline_misses && !rp->rr_sim_misses_deadline) {
continue;
}
bool new_best = false; bool new_best = false;
if (best_result) { if (best_result) {
if (rp->report_deadline < best_result->report_deadline) { if (rp->report_deadline < best_result->report_deadline) {