From 7f2a3c0ce1f8706410ae81639c45f9cfeff5d184 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 13 Sep 2011 22:58:39 +0000 Subject: [PATCH] - client: get GPU available RAM at startup (only) - client: fix compile warning svn path=/trunk/boinc/; revision=24188 --- checkin_notes | 12 ++++++++++++ client/client_state.cpp | 2 ++ client/coproc_detect.cpp | 41 +++++++--------------------------------- client/cpu_sched.cpp | 8 -------- client/work_fetch.cpp | 14 +++++++------- client/work_fetch.h | 2 +- lib/coproc.cpp | 1 - 7 files changed, 29 insertions(+), 51 deletions(-) diff --git a/checkin_notes b/checkin_notes index ff0ef9936f..0028141406 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5957,3 +5957,15 @@ Rom 13 Sept 2011 samples/vboxwrapper/ vbox.cpp + +David 13 Sept 2011 + - client: get GPU available RAM at startup (only) + - client: fix compile warning + + lib/ + coproc.cpp + client/ + work_fetch.cpp,h + client_state.cpp + coproc_detect.cpp + cpu_sched.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index 1eebf885fd..7fa101d2b1 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -386,6 +386,7 @@ int CLIENT_STATE::init() { msg_printf(NULL, MSG_INFO, "NVIDIA GPU info taken from cc_config.xml"); } else { coprocs.add(coprocs.nvidia); + coprocs.nvidia.print_available_ram(); } } if (coprocs.have_ati()) { @@ -393,6 +394,7 @@ int CLIENT_STATE::init() { msg_printf(NULL, MSG_INFO, "ATI GPU info taken from cc_config.xml"); } else { coprocs.add(coprocs.ati); + coprocs.ati.print_available_ram(); } } host_info._coprocs = coprocs; diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index 5972890130..054f750130 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -47,8 +47,6 @@ using std::string; using std::vector; -//#define MEASURE_AVAILABLE_RAM - static bool in_vector(int n, vector& v) { for (unsigned int i=0; i& jobs) { coprocs.clear_usage(); if (coprocs.have_nvidia()) { - coprocs.nvidia.get_available_ram(); - if (log_flags.coproc_debug) { - coprocs.nvidia.print_available_ram(); - } copy_available_ram(coprocs.nvidia, GPU_TYPE_NVIDIA); } if (coprocs.have_ati()) { - coprocs.ati.get_available_ram(); - if (log_flags.coproc_debug) { - coprocs.ati.print_available_ram(); - } copy_available_ram(coprocs.ati, GPU_TYPE_ATI); } diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 5e3dce5b1e..16dde7c4a3 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -298,16 +298,16 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) { switch (criterion) { case FETCH_IF_IDLE_INSTANCE: case FETCH_IF_MAJOR_SHORTFALL: - set_request(pbest, true); + set_request(pbest); break; case FETCH_IF_PROJECT_STARVED: - set_request(pbest, false); + set_request(pbest); break; case FETCH_IF_MINOR_SHORTFALL: // in this case, potentially request work for all resources // if (project_priority(pbest) < 0) { - set_request(pbest, true); + set_request(pbest); } else { work_fetch.set_all_requests(pbest); } @@ -339,7 +339,7 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) { // request this project's share of shortfall and instances. // don't request anything if project is overworked or backed off. // -void RSC_WORK_FETCH::set_request(PROJECT* p, bool allow_overworked) { +void RSC_WORK_FETCH::set_request(PROJECT* p) { if (dont_fetch(p, rsc_type)) return; // if backup project, fetch 1 job per idle instance @@ -474,13 +474,13 @@ void RSC_WORK_FETCH::supplement(PROJECT* pp) { } } // didn't find a better project; ask for work - set_request(pp, true); + set_request(pp); } void WORK_FETCH::set_all_requests_hyst(PROJECT* p, int rsc_type) { for (int i=0; i