diff --git a/checkin_notes b/checkin_notes index a6ee1ae1a5..f2e746cfdb 100755 --- a/checkin_notes +++ b/checkin_notes @@ -14420,3 +14420,11 @@ Rom 1 July 2004 db/ db_base.C, .h boinc_db.C, .h + +Daniel 2004-07-01 + - client: scheduler now only calls set_client_state_dirty if some + task was started or stopped (i.e. set of running tasks changed). + + client/ + cs_apps.C + diff --git a/client/cs_apps.C b/client/cs_apps.C index bb4278a191..811d2ab152 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -335,7 +335,7 @@ bool CLIENT_STATE::schedule_largest_debt_project(double expected_pay_off) { bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { double expected_pay_off; vector::iterator iter; - bool some_app_started = false; + bool some_app_stopped = false, some_app_started = false; double total_resource_share = 0; int retval, elapsed_time; unsigned int i; @@ -387,6 +387,7 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { && atp->next_scheduler_state == CPU_SCHED_PREEMPTED ) { atp->preempt(); + some_app_stopped = true; iter++; } else if (atp->scheduler_state != CPU_SCHED_RUNNING && atp->next_scheduler_state == CPU_SCHED_RUNNING @@ -419,8 +420,10 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { } cpu_sched_work_done_this_period = 0; - set_client_state_dirty("schedule_cpus"); cpu_sched_last_time = time(0); + if (some_app_started || some_app_stopped) { + set_client_state_dirty("schedule_cpus"); + } if (some_app_started) { app_started = cpu_sched_last_time; }