From 4b0cae80f5068a6fa08816ac44d06ae15203e266 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 17 Dec 2009 23:32:21 +0000 Subject: [PATCH] - client: in computing "anticipated" STD, scale by ninstances (from John McLeod) svn path=/trunk/boinc/; revision=19959 --- checkin_notes | 7 +++++++ client/cpu_sched.cpp | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index b86eda9051..aa6c5b1180 100644 --- a/checkin_notes +++ b/checkin_notes @@ -10222,3 +10222,10 @@ David 17 Dec 2009 client/ cpu_sched.cpp + +David 17 Dec 2009 + - client: in computing "anticipated" STD, scale by ninstances + (from John McLeod) + + client/ + cpu_sched.cpp diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index 41ca57698b..e5894e7b19 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -635,9 +635,12 @@ static bool schedule_if_possible( } proc_rsc.schedule(rp); double dt = gstate.global_prefs.cpu_scheduling_period(); - rp->project->cpu_pwf.anticipated_debt -= dt*rp->avp->avg_ncpus; - rp->project->cuda_pwf.anticipated_debt -= dt*rp->avp->ncudas; - rp->project->ati_pwf.anticipated_debt -= dt*rp->avp->natis; + + // project STD at end of scheduling period + // + rp->project->cpu_pwf.anticipated_debt -= dt*rp->avp->avg_ncpus/cpu_work_fetch.ninstances; + rp->project->cuda_pwf.anticipated_debt -= dt*rp->avp->ncudas/cuda_work_fetch.ninstances; + rp->project->ati_pwf.anticipated_debt -= dt*rp->avp->natis/ati_work_fetch.ninstances; return true; }