From e033c50df617f13a167079633cd3b001ab1af73f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 8 Aug 2011 00:49:16 +0000 Subject: [PATCH] - client: projects with zero resource share are always lower priority, for both job sched and work fetch, than projects with positive resource share. svn path=/trunk/boinc/; revision=23946 --- checkin_notes | 11 ++++++++++- client/cpu_sched.cpp | 7 +++++++ client/work_fetch.cpp | 1 - 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3713772711..009ec25b3c 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4673,7 +4673,7 @@ David 6 Aug 2011 submit_example.php submit.php -David 6 Aug 2011 +David 7 Aug 2011 - remote job submission: bug fixes html/ @@ -4684,3 +4684,12 @@ David 6 Aug 2011 user/ submit_example.php submit.php + +David 7 Aug 2011 + - client: projects with zero resource share are always lower priority, + for both job sched and work fetch, + than projects with positive resource share. + + client/ + cpu_sched.cpp + work_fetch.cpp diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index a43cc63058..323db1eaa6 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -608,6 +608,13 @@ void project_priority_init() { double project_priority(PROJECT* p) { double x = p->resource_share_frac - p->pwf.rec_temp/rec_sum; + + // projects with zero resource share are always lower priority + // than those with positive resource share + // + if (p->resource_share == 0) { + x -= 1; + } #if 0 msg_printf(p, MSG_INFO, "priority: rs frac %.3f rec_temp %.3f rec_sum %.3f prio %f\n", diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 09b0f148d4..fc6fe033e2 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -872,7 +872,6 @@ void WORK_FETCH::compute_work_request(PROJECT* p) { clear_request(); if (config.fetch_minimal_work && gstate.had_or_requested_work) return; if (p->dont_request_more_work) return; - if (p->resource_share == 0) return; if (p->non_cpu_intensive) { if (!has_a_job(p)) { rsc_work_fetch[0].req_secs = 1;