mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4226
This commit is contained in:
parent
0be71c64c9
commit
d910173870
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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; i<active_tasks.active_tasks.size(); i++) {
|
||||
if (active_tasks.active_tasks[i]->scheduler_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<cpu_sched_period && !have_free_cpu() && !must_reschedule)
|
||||
if ((elapsed_time<cpu_sched_period && !must_reschedule)
|
||||
|| projects.size() < 1
|
||||
|| results.size() < 1
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue