mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4236
This commit is contained in:
parent
5f837c5a6c
commit
ef6fb9589a
|
@ -17673,3 +17673,12 @@ David 23 Sept 2004
|
|||
client_types.C,h
|
||||
cs_scheduler.C
|
||||
scheduler_op.C,h
|
||||
|
||||
Lana 23 Sept 2004
|
||||
- refactored access and storage to cpu_sched_period for the project.
|
||||
now it is being maintained in global prefs only.
|
||||
|
||||
client/
|
||||
cs_statefile.C
|
||||
cs_apps.C
|
||||
client_state.C,h
|
||||
|
|
|
@ -106,7 +106,6 @@ CLIENT_STATE::CLIENT_STATE() {
|
|||
pers_giveup = PERS_GIVEUP;
|
||||
executing_as_windows_service = false;
|
||||
cpu_sched_last_time = 0;
|
||||
cpu_sched_period = 3600; // 1 hour
|
||||
cpu_sched_work_done_this_period = 0;
|
||||
must_schedule_cpus = false;
|
||||
}
|
||||
|
@ -290,9 +289,6 @@ int CLIENT_STATE::init() {
|
|||
// set period start time
|
||||
cpu_sched_last_time = time(NULL);
|
||||
|
||||
// set initial work_done_this_period so project debts are non-zero
|
||||
cpu_sched_work_done_this_period = cpu_sched_period * ncpus;
|
||||
|
||||
// set up the project and slot directories
|
||||
//
|
||||
retval = make_project_dirs();
|
||||
|
|
|
@ -142,7 +142,6 @@ private:
|
|||
// CPU sched state
|
||||
//
|
||||
time_t cpu_sched_last_time;
|
||||
int cpu_sched_period;
|
||||
double cpu_sched_work_done_this_period;
|
||||
|
||||
// --------------- client_state.C:
|
||||
|
|
|
@ -350,7 +350,7 @@ bool CLIENT_STATE::schedule_cpus() {
|
|||
must_schedule_cpus = false;
|
||||
} else {
|
||||
elapsed_time = time(0) - cpu_sched_last_time;
|
||||
if (elapsed_time<cpu_sched_period) {
|
||||
if (elapsed_time < global_prefs.cpu_sched_period) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -266,7 +266,6 @@ int CLIENT_STATE::parse_state_file() {
|
|||
// after core client update
|
||||
} else if (parse_int(buf, "<core_client_major_version>", old_major_version)) {
|
||||
} else if (parse_int(buf, "<core_client_minor_version>", old_minor_version)) {
|
||||
} else if (parse_int(buf, "<cpu_sched_period>", cpu_sched_period)) {
|
||||
} else if (parse_double(buf, "<cpu_sched_work_done_this_period>", cpu_sched_work_done_this_period)) {
|
||||
} else if (match_tag(buf, "<proxy_info>")) {
|
||||
retval = pi.parse(mf);
|
||||
|
@ -383,9 +382,7 @@ int CLIENT_STATE::write_state(MIOFILE& f) {
|
|||
// save CPU scheduling state
|
||||
//
|
||||
f.printf(
|
||||
"<cpu_sched_period>%d</cpu_sched_period>\n"
|
||||
"<cpu_sched_work_done_this_period>%f</cpu_sched_work_done_this_period>\n",
|
||||
cpu_sched_period,
|
||||
cpu_sched_work_done_this_period
|
||||
);
|
||||
|
||||
|
@ -538,9 +535,7 @@ int CLIENT_STATE::write_state_gui(MIOFILE& f) {
|
|||
// save CPU scheduling state
|
||||
//
|
||||
f.printf(
|
||||
"<cpu_sched_period>%d</cpu_sched_period>\n"
|
||||
"<cpu_sched_work_done_this_period>%f</cpu_sched_work_done_this_period>\n",
|
||||
cpu_sched_period,
|
||||
cpu_sched_work_done_this_period
|
||||
);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ void GLOBAL_PREFS::init() {
|
|||
//work_buf_max_days = 0.2;
|
||||
work_buf_min_days = 0.1;
|
||||
max_cpus = 1;
|
||||
cpu_sched_period= 3600;
|
||||
cpu_sched_period= 3600; //1 hour
|
||||
disk_interval = 60;
|
||||
disk_max_used_gb = 1;
|
||||
disk_max_used_pct = 50;
|
||||
|
@ -173,7 +173,7 @@ int GLOBAL_PREFS::parse(FILE* in, char* host_venue, bool& found_venue) {
|
|||
} else if (parse_double(buf, "<disk_interval>", disk_interval)) {
|
||||
if (disk_interval<0) disk_interval = 0;
|
||||
continue;
|
||||
} else if (parse_double(buf, "<cpu_scheduling_period_minutes>", cpu_sched_period)) {
|
||||
} else if (parse_int(buf, "<cpu_scheduling_period_minutes>", cpu_sched_period)) {
|
||||
cpu_sched_period= cpu_sched_period * 60;
|
||||
continue;
|
||||
} else if (parse_double(buf, "<disk_max_used_gb>", disk_max_used_gb)) {
|
||||
|
|
|
@ -46,7 +46,7 @@ struct GLOBAL_PREFS {
|
|||
//double work_buf_max_days;
|
||||
double work_buf_min_days;
|
||||
int max_cpus;
|
||||
double cpu_sched_period;
|
||||
int cpu_sched_period;
|
||||
double disk_interval;
|
||||
double disk_max_used_gb;
|
||||
double disk_max_used_pct;
|
||||
|
|
Loading…
Reference in New Issue