mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3739
This commit is contained in:
parent
58080cf755
commit
b7a4733a18
|
@ -14420,3 +14420,11 @@ Rom 1 July 2004
|
||||||
db/
|
db/
|
||||||
db_base.C, .h
|
db_base.C, .h
|
||||||
boinc_db.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
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ bool CLIENT_STATE::schedule_largest_debt_project(double expected_pay_off) {
|
||||||
bool CLIENT_STATE::schedule_cpus(bool must_reschedule) {
|
bool CLIENT_STATE::schedule_cpus(bool must_reschedule) {
|
||||||
double expected_pay_off;
|
double expected_pay_off;
|
||||||
vector<ACTIVE_TASK*>::iterator iter;
|
vector<ACTIVE_TASK*>::iterator iter;
|
||||||
bool some_app_started = false;
|
bool some_app_stopped = false, some_app_started = false;
|
||||||
double total_resource_share = 0;
|
double total_resource_share = 0;
|
||||||
int retval, elapsed_time;
|
int retval, elapsed_time;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -387,6 +387,7 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) {
|
||||||
&& atp->next_scheduler_state == CPU_SCHED_PREEMPTED
|
&& atp->next_scheduler_state == CPU_SCHED_PREEMPTED
|
||||||
) {
|
) {
|
||||||
atp->preempt();
|
atp->preempt();
|
||||||
|
some_app_stopped = true;
|
||||||
iter++;
|
iter++;
|
||||||
} else if (atp->scheduler_state != CPU_SCHED_RUNNING
|
} else if (atp->scheduler_state != CPU_SCHED_RUNNING
|
||||||
&& atp->next_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;
|
cpu_sched_work_done_this_period = 0;
|
||||||
|
|
||||||
set_client_state_dirty("schedule_cpus");
|
|
||||||
cpu_sched_last_time = time(0);
|
cpu_sched_last_time = time(0);
|
||||||
|
if (some_app_started || some_app_stopped) {
|
||||||
|
set_client_state_dirty("schedule_cpus");
|
||||||
|
}
|
||||||
if (some_app_started) {
|
if (some_app_started) {
|
||||||
app_started = cpu_sched_last_time;
|
app_started = cpu_sched_last_time;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue