diff --git a/checkin_notes b/checkin_notes index 51f48d920f..fa41be0b6e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8511,3 +8511,10 @@ David 25 June 2005 boinc_api.C sched/ server_types.C + +David 25 June 2005 + - Fix to PROJECT::set_rrsim_proc_rate() + (problem identified by John McLeod) + + client/ + cs_scheduler.C diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index dd64e06c8d..e65347ffed 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -985,12 +985,23 @@ bool CLIENT_STATE::should_get_work() { } void PROJECT::set_rrsim_proc_rate(double per_cpu_proc_rate, double rrs) { - if (active.size() == 0) return; - double x = 1; - if ((int)active.size() < gstate.ncpus) { - x = ((double)gstate.ncpus)/active.size(); + int nactive = (int)active.size(); + if (nactive == 0) return; + double x = resource_share/rrs; + + // if this project has fewer active results than CPUs, + // scale up its share to reflect this + // + if (nactive < gstate.ncpus) { + x *= ((double)gstate.ncpus)/nactive; } - rrsim_proc_rate = x*per_cpu_proc_rate*resource_share/rrs; + + // But its rate on a given CPU can't exceed the CPU speed + // + if (x>1) { + x = 1; + } + rrsim_proc_rate = x*per_cpu_proc_rate; } // return true if we don't have enough runnable tasks to keep all CPUs busy diff --git a/doc/boinc_news.inc b/doc/boinc_news.inc index 5945df3c9c..dab8789202 100644 --- a/doc/boinc_news.inc +++ b/doc/boinc_news.inc @@ -2,6 +2,10 @@ $project_news = array( +array("June 25, 2005", + "BOINC statistics sites continue to evolve. + Check out Every Earthly Hour, developed by Hydnum Repandum" +), array("June 24, 2005", "We have added new API calls diff --git a/doc/index.php b/doc/index.php index 6c5f5e094b..31603e17d3 100644 --- a/doc/index.php +++ b/doc/index.php @@ -132,8 +132,9 @@ and do not necessarily reflect the views of the National Science Foundation.