- client: scheduling tweak.

Old: if a project has RR sim deadline misses,
			select jobs to run high-priority on the basis of:
			1) deadline (earliest first)
			2) estimated time to completion (least first)
			This ignores whether jobs missed their deadline in RR sim,
			so it may choose to run a job that's actually in no
			danger of missing its deadline over one that is.
		New: choose only jobs that miss their deadline in RR sim

svn path=/trunk/boinc/; revision=19826
This commit is contained in:
David Anderson 2009-12-08 20:39:46 +00:00
parent b41ea18233
commit e9a4debf9c
4 changed files with 50 additions and 16 deletions

View File

@ -9839,3 +9839,19 @@ David 7 Dec 2009
client/
work_fetch.cpp
David 8 Dec 2009
- client: scheduling tweak.
Old: if a project has RR sim deadline misses,
select jobs to run high-priority on the basis of:
1) deadline (earliest first)
2) estimated time to completion (least first)
This ignores whether jobs missed their deadline in RR sim,
so it may choose to run a job that's actually in no
danger of missing its deadline over one that is.
New: choose only jobs that miss their deadline in RR sim
client/
cpu_sched.cpp
rr_sim.cpp
work_fetch.cpp

View File

@ -401,6 +401,7 @@ RESULT* CLIENT_STATE::earliest_deadline_result(bool coproc_only) {
RESULT *best_result = NULL;
ACTIVE_TASK* best_atp = NULL;
unsigned int i;
bool only_deadline_misses = true;
for (i=0; i<results.size(); i++) {
RESULT* rp = results[i];
@ -414,27 +415,36 @@ RESULT* CLIENT_STATE::earliest_deadline_result(bool coproc_only) {
if (coproc_only) {
if (!rp->uses_coprocs()) continue;
if (rp->avp->ncudas) {
if (!p->cuda_pwf.deadlines_missed_copy
&& p->duration_correction_factor < 90.0
) {
continue;
if (p->duration_correction_factor < 90.0) {
if (!p->cuda_pwf.deadlines_missed_copy) {
continue;
}
} else {
only_deadline_misses = false;
}
} else if (rp->avp->natis) {
if (!p->ati_pwf.deadlines_missed_copy
&& p->duration_correction_factor < 90.0
) {
continue;
if (p->duration_correction_factor < 90.0) {
if (!p->ati_pwf.deadlines_missed_copy) {
continue;
}
} else {
only_deadline_misses = false;
}
}
} else {
if (rp->uses_coprocs()) continue;
if (!p->cpu_pwf.deadlines_missed_copy
&& p->duration_correction_factor < 90.0
) {
continue;
if (p->duration_correction_factor < 90.0) {
if (!p->cpu_pwf.deadlines_missed_copy) {
continue;
}
} else {
only_deadline_misses = false;
}
}
if (only_deadline_misses && !rp->rr_sim_misses_deadline) {
continue;
}
bool new_best = false;
if (best_result) {
if (rp->report_deadline < best_result->report_deadline) {

View File

@ -182,8 +182,8 @@ void set_rrsim_flops(RESULT* rp) {
#if 0
if (log_flags.rr_simulation) {
msg_printf(p, MSG_INFO,
"[rr_sim] set_rrsim_flops: %f (r1 %f r2 %f r3 %f)",
rp->rrsim_flops, r1, r2, r3
"[rr_sim] set_rrsim_flops: %.2fG (r1 %.4f r2 %.4f r3 %.4f)",
rp->rrsim_flops/1e9, r1, r2, r3
);
}
#endif

View File

@ -1190,7 +1190,15 @@ double ACTIVE_TASK::est_time_to_completion(bool for_work_fetch) {
double fraction_left = 1-fraction_done;
double wu_weight = fraction_left * fraction_left;
double fd_weight = 1 - wu_weight;
double x = fd_weight*frac_est + wu_weight*fraction_left*wu_est;
double x = fd_weight*frac_est + wu_weight*wu_est;
#if 0
if (log_flags.rr_simulation) {
msg_printf(result->project, MSG_INFO,
"[rr_sim] %s: %.2f = %.3f*%.2f + %.3f*%.2f",
result->name, x, fd_weight, frac_est, wu_weight, wu_est
);
}
#endif
return x;
}