svn path=/trunk/boinc/; revision=9398
This commit is contained in:
David Anderson 2006-02-03 08:36:00 +00:00
parent 710be691c3
commit 7f6fe69e50
2 changed files with 12 additions and 5 deletions

View File

@ -1436,3 +1436,11 @@ David 2 Feb 2005
client/
cs_apps.C
David 2 Feb 2005
- core client: long-term debt is modified only over
potentially runnable projects,
but it's averaged and normalized over all projects.
client/
cs_apps.C

View File

@ -481,16 +481,16 @@ void CLIENT_STATE::adjust_debts() {
for (i=0; i<projects.size(); i++) {
p = projects[i];
if (p->non_cpu_intensive) continue;
nprojects++;
// adjust long-term debts
//
if (p->potentially_runnable() || p->wall_cpu_time_this_period) {
nprojects++;
share_frac = p->resource_share/prrs;
p->long_term_debt += share_frac*total_wall_cpu_time_this_period
- p->wall_cpu_time_this_period;
total_long_term_debt += p->long_term_debt;
}
total_long_term_debt += p->long_term_debt;
// adjust short term debts
//
@ -537,9 +537,8 @@ void CLIENT_STATE::adjust_debts() {
p->anticipated_debt = p->short_term_debt;
//msg_printf(p, MSG_INFO, "debt %f", p->short_term_debt);
}
if (p->potentially_runnable() || p->wall_cpu_time_this_period) {
p->long_term_debt -= avg_long_term_debt;
}
p->long_term_debt -= avg_long_term_debt;
}
}