*** empty log message ***

svn path=/trunk/boinc/; revision=10818
This commit is contained in:
David Anderson 2006-08-02 16:57:09 +00:00
parent 56716723bb
commit 6641b8d877
6 changed files with 41 additions and 9 deletions

View File

@ -8317,3 +8317,23 @@ Charlie 1 Aug 2006
mac_build/
boinc.xcodeproj/
project.pbxproj
David 2 Aug 2006
- core client: fix CPU throttling mechanism.
- Range is 0..100, not 0..1
- ACTIVE_TASK::prempt(): don't set scheduler_state
(that's not the job of this layer)
- core client: fiddle with messages
"task" should show you when results start and end
(always 2 messages per result)
"task_debug" shows every suspend/resume/checkpoint
"cpu_sched_debug" shows the results selected by scheduler
(more fiddling still needed)
client/
app_control.C
app_start.C
cpu_sched.C
cs_prefs.C
lib/
prefs.C

View File

@ -152,9 +152,7 @@ int ACTIVE_TASK::preempt(bool quit_task) {
retval = suspend();
}
scheduler_state = CPU_SCHED_PREEMPTED;
if (log_flags.task) {
if (log_flags.task_debug) {
msg_printf(result->project, MSG_INFO,
"Pausing task %s (%s)",
result->name, (quit_task ? "removed from memory" : "left in memory")
@ -837,6 +835,9 @@ int ACTIVE_TASK::suspend() {
//
int ACTIVE_TASK::unsuspend() {
if (!app_client_shm.shm) return 0;
if (log_flags.task_debug) {
msg_printf(0, MSG_INFO, "Resuming %s", result->name);
}
process_control_queue.msg_queue_send(
"<resume/>",
app_client_shm.shm->process_control_request

View File

@ -313,9 +313,14 @@ int ACTIVE_TASK::start(bool first_time) {
std::string cmd_line;
#endif
if (first_time && log_flags.task) {
msg_printf(0, MSG_INFO,
"Starting %s", result->name
);
}
if (log_flags.task_debug) {
msg_printf(0, MSG_INFO,
"ACTIVE_TASK::start(first_time=%d)\n", first_time
"Starting %s%s", result->name, first_time?" (first time)":""
);
}

View File

@ -442,6 +442,9 @@ void CLIENT_STATE::schedule_cpus() {
rp->already_selected = true;
rp->project->anticipated_debt -= (1 - rp->project->resource_share / rrs) * expected_pay_off;
rp->project->deadlines_missed--;
if (log_flags.cpu_sched_debug) {
msg_printf(NULL, MSG_INFO, "scheduling (deadline) %s", rp->name);
}
ordered_scheduled_results.push_back(rp);
}
@ -452,6 +455,9 @@ void CLIENT_STATE::schedule_cpus() {
rp = largest_debt_project_best_result();
if (!rp) break;
rp->project->anticipated_debt -= (1 - rp->project->resource_share / rrs) * expected_pay_off;
if (log_flags.cpu_sched_debug) {
msg_printf(NULL, MSG_INFO, "scheduling (regular) %s", rp->name);
}
ordered_scheduled_results.push_back(rp);
}

View File

@ -208,9 +208,7 @@ static string reason_string(int reason) {
int CLIENT_STATE::suspend_tasks(int reason) {
if (reason == SUSPEND_REASON_CPU_USAGE_LIMIT) {
if (log_flags.cpu_sched) {
string s_reason;
s_reason = "Suspending computation" + reason_string(reason);
msg_printf(NULL, MSG_INFO, s_reason.c_str());
msg_printf(NULL, MSG_INFO, "Suspending - CPU throttle");
}
active_tasks.suspend_all(true);
} else {
@ -224,8 +222,10 @@ int CLIENT_STATE::suspend_tasks(int reason) {
int CLIENT_STATE::resume_tasks(int reason) {
if (reason == SUSPEND_REASON_CPU_USAGE_LIMIT) {
if (log_flags.cpu_sched) {
msg_printf(NULL, MSG_INFO, "Resuming - CPU throttle");
}
active_tasks.unsuspend_all();
gstate.request_schedule_cpus("usage limit");
} else {
msg_printf(NULL, MSG_INFO, "Resuming computation");
active_tasks.unsuspend_all();

View File

@ -212,7 +212,7 @@ int GLOBAL_PREFS::parse_override(
} else if (parse_int(buf, "<cpu_affinity>", cpu_affinity)) {
continue;
} else if (parse_double(buf, "<cpu_usage_limit>", dtemp)) {
if (dtemp > 0 && dtemp <= 1) {
if (dtemp > 0 && dtemp <= 100) {
cpu_usage_limit = dtemp;
}
continue;