*** empty log message ***

svn path=/trunk/boinc/; revision=4408
This commit is contained in:
David Anderson 2004-10-23 04:35:37 +00:00
parent ed3f144193
commit 91b6e57ae2
3 changed files with 13 additions and 3 deletions

View File

@ -18789,3 +18789,12 @@ Jeff 22 Oct 2004
db/
boinc_db.C
David 22 Oct 2004
- schedule_cpus(): assume that if a task ran for X seconds,
it got X seconds of CPU time.
This makes the schedule work correctly even when
apps don't report their CPU time.
client/
client_state.C
cs_apps.C

View File

@ -283,7 +283,7 @@ int CLIENT_STATE::init() {
// set period start time and reschedule
//
must_schedule_cpus = true;
cpu_sched_last_time = time(NULL);
cpu_sched_last_time = dtime();
// set up the project and slot directories
//

View File

@ -354,10 +354,10 @@ bool CLIENT_STATE::schedule_cpus(double now) {
// or if must_schedule_cpus is set
// (meaning a new result is available, or a CPU has been freed).
//
elapsed_time = now - cpu_sched_last_time;
if (must_schedule_cpus) {
must_schedule_cpus = false;
} else {
elapsed_time = now - cpu_sched_last_time;
if (elapsed_time < (global_prefs.cpu_scheduling_period_minutes*60)) {
return false;
}
@ -389,7 +389,8 @@ bool CLIENT_STATE::schedule_cpus(double now) {
for (i=0; i<active_tasks.active_tasks.size(); i++) {
atp = active_tasks.active_tasks[i];
if (atp->scheduler_state != CPU_SCHED_SCHEDULED) continue;
double task_cpu_time = atp->current_cpu_time - atp->cpu_time_at_last_sched;
//double task_cpu_time = atp->current_cpu_time - atp->cpu_time_at_last_sched;
double task_cpu_time = elapsed_time;
atp->result->project->work_done_this_period += task_cpu_time;
cpu_sched_work_done_this_period += task_cpu_time;
atp->next_scheduler_state = CPU_SCHED_PREEMPTED;