From 6709910d1c498c01691f96a5c789bc873dbed734 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 6 Sep 2006 21:58:12 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11118 --- checkin_notes | 11 +++++++++++ client/client_types.C | 8 ++++++-- client/client_types.h | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 26cb27cbd0..b21a4d220e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9890,3 +9890,14 @@ David 6 Sept 2006 team_lookup.php lib/ error_numbers.h + +David 6 Sept 2006 + - core client: scheduling bug fix: + the definitions of "nearly runnable" were slightly + different for project and result. + This could lead to a rare situation where rr_simulation() + would generate huge cpu shortfalls. + (from John McLeod) + + client/ + client_types.C,h diff --git a/client/client_types.C b/client/client_types.C index 9f6e7a1073..02e8ff67b7 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -379,7 +379,7 @@ bool PROJECT::downloading() { for (unsigned int i=0; iproject != this) continue; - if (rp->state == RESULT_FILES_DOWNLOADING) return true; + if (rp->downloading()) return true; } return false; } @@ -1664,9 +1664,13 @@ bool RESULT::runnable() { } bool RESULT::nearly_runnable() { + return runnable() || downloading(); +} + +bool RESULT::downloading() { if (suspended_via_gui) return false; if (project->suspended_via_gui) return false; - if (computing_done()) return false; + if (state > RESULT_FILES_DOWNLOADING) return false; return true; } diff --git a/client/client_types.h b/client/client_types.h index 32ed447e6b..df8bea349d 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -470,6 +470,8 @@ struct RESULT { bool nearly_runnable(); // downloading or downloaded, // not finished, suspended, project not suspended + bool downloading(); + // downloading, not downloaded, not suspended, project not suspended // temporaries used in CLIENT_STATE::rr_misses_deadline(): double rrsim_cpu_left; double rrsim_finish_delay;