From e475c64a3b47f968bef7499c6c7e9f1a4f817c98 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 3 Sep 2009 04:39:58 +0000 Subject: [PATCH] - client: fix log messages about scheduler RPC work req - client: missing reset for ATI debt accounting svn path=/trunk/boinc/; revision=18998 --- checkin_notes | 9 +++++++++ client/client_state.cpp | 3 +++ client/cpu_sched.cpp | 6 +++++- client/scheduler_op.cpp | 7 ++++--- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index a3beac1303..b768dcef1a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7479,3 +7479,12 @@ David 2 Sept 2009 client/ sysmon_win.cpp + +David 2 Sept 2009 + - client: fix log messages about scheduler RPC work req + - client: missing reset for ATI debt accounting + + client/ + client_state.cpp + cpu_sched.cpp + scheduler_op.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index 6c11745a43..59952accf0 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -565,6 +565,9 @@ bool CLIENT_STATE::poll_slow_events() { request_schedule_cpus("Idle state change"); } + // NVIDIA provides an interface for finding if a GPU is + // running a graphics app. ATI doesn't as far as I know + // if (coproc_cuda && user_active && !global_prefs.run_gpu_if_user_active) { if (coproc_cuda->check_running_graphics_app()) { request_schedule_cpus("GPU state change"); diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index 4d32415dbd..baf253fe6c 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -419,6 +419,9 @@ void CLIENT_STATE::reset_debt_accounting() { if (coproc_cuda) { p->cuda_pwf.reset_debt_accounting(); } + if (coproc_ati) { + p->ati_pwf.reset_debt_accounting(); + } } cpu_work_fetch.reset_debt_accounting(); if (coproc_cuda) { @@ -1009,7 +1012,8 @@ static inline void assign_coprocs(vector jobs) { } } - // enforce user pref in NVIDIA case + // enforce "don't use GPUs while active" pref in NVIDIA case; + // it applies only to GPUs running a graphics app // if (coproc_cuda && gstate.user_active && !gstate.global_prefs.run_gpu_if_user_active) { job_iter = jobs.begin(); diff --git a/client/scheduler_op.cpp b/client/scheduler_op.cpp index d790fa8920..969ffcd603 100644 --- a/client/scheduler_op.cpp +++ b/client/scheduler_op.cpp @@ -217,9 +217,10 @@ int SCHEDULER_OP::start_rpc(PROJECT* p) { msg_printf(p, MSG_INFO, "Sending scheduler request: %s.", rpc_reason_string(reason) ); - if (cpu_work_fetch.req_secs || cuda_work_fetch.req_secs) { - if (coproc_cuda) { - if (cpu_work_fetch.req_secs && cuda_work_fetch.req_secs) { + double gpu_req = cuda_work_fetch.req_secs + ati_work_fetch.req_secs; + if (cpu_work_fetch.req_secs || gpu_req) { + if (coproc_cuda||coproc_ati) { + if (cpu_work_fetch.req_secs && gpu_req) { sprintf(buf, " for CPU and GPU"); } else if (cpu_work_fetch.req_secs) { sprintf(buf, " for CPU");