From eaeacc84047200444aa9493199f52c0b88a122db Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 4 Dec 2007 23:48:08 +0000 Subject: [PATCH] - client: CPU sched bug fixes when project has huge DCF. Also prevent switching between two jobs with same deadline. svn path=/trunk/boinc/; revision=14355 --- checkin_notes | 7 +++++++ client/cpu_sched.C | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 357600bc84..7772de5f0d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -12103,3 +12103,10 @@ David 4 Dec 2007 html/user/ team_edit_action.php + +David 4 Dec 2007 + - client: CPU sched bug fixes when project has huge DCF. + Also prevent switching between two jobs with same deadline. + + client/ + cpu_sched.C diff --git a/client/cpu_sched.C b/client/cpu_sched.C index 6fb72b9452..f4351bde89 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -205,14 +205,13 @@ RESULT* CLIENT_STATE::earliest_deadline_result() { if (!rp->runnable()) continue; if (rp->project->non_cpu_intensive) continue; if (rp->already_selected) continue; - if (!rp->project->deadlines_missed) continue; + if (!rp->project->deadlines_missed && rp->project->duration_correction_factor < 90.0) continue; + // treat projects with DCF>90 as if they had deadline misses bool new_best = false; if (best_result) { if (rp->report_deadline < best_result->report_deadline) { new_best = true; - } else if (rp->project->duration_correction_factor > 90.0) { - new_best = true; } } else { new_best = true; @@ -233,6 +232,7 @@ RESULT* CLIENT_STATE::earliest_deadline_result() { if (best_atp && !atp) continue; if (rp->estimated_cpu_time_remaining(false) < best_result->estimated_cpu_time_remaining(false) + || (!best_atp && atp) ) { best_result = rp; best_atp = atp;