diff --git a/checkin_notes b/checkin_notes index 2339d91e2e..a11d8f181c 100755 --- a/checkin_notes +++ b/checkin_notes @@ -17590,3 +17590,12 @@ David 22 Sept 2004 client/ client_state.C client_types.C,h + +Rom 22 Sept 2004 + - Fix CPU Scheduler bug on a multi-proc machine after a project reset where + the core client gets stuck in a loop trying to schedule work that does + not exist. + + client/ + client_state.h + cs_apps.C diff --git a/client/client_state.h b/client/client_state.h index f52793dfe2..cd65e1cf16 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -202,7 +202,6 @@ private: int choose_version_num(char*, SCHEDULER_REPLY&); int app_finished(ACTIVE_TASK&); - bool have_free_cpu(); void assign_results_to_projects(); bool schedule_largest_debt_project(double expected_pay_off); bool start_apps(); diff --git a/client/cs_apps.C b/client/cs_apps.C index 6d95bdd997..5368bd4230 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -211,19 +211,6 @@ bool CLIENT_STATE::input_files_available(RESULT* rp) { } -// Return true iff there are fewer scheduled tasks than available CPUs -// -bool CLIENT_STATE::have_free_cpu() { - int num_running_tasks = 0; - unsigned int i; - for (i=0; ischeduler_state == CPU_SCHED_SCHEDULED) { - ++num_running_tasks; - } - } - return num_running_tasks < ncpus; -} - // Choose a "best" runnable result for each project // // Values are returned in project->next_runnable_result @@ -355,7 +342,7 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { // Reschedule every cpu_sched_period seconds or as needed // elapsed_time = time(0) - cpu_sched_last_time; - if ((elapsed_time