*** empty log message ***

svn path=/trunk/boinc/; revision=6229
This commit is contained in:
David Anderson 2005-05-24 00:39:50 +00:00
parent 4b431ad129
commit 39561fbc56
1 changed files with 15 additions and 3 deletions

View File

@ -478,13 +478,25 @@ bool CLIENT_STATE::schedule_cpus(double now) {
double debt_inc = double debt_inc =
(p->resource_share/local_total_resource_share) (p->resource_share/local_total_resource_share)
* cpu_sched_work_done_this_period * cpu_sched_work_done_this_period
- p->work_done_this_period; - p->work_done_this_period
p->long_term_debt += debt_inc; ;
// if the project is suspended or communications is deferred or
// the user has asked for no work.
// This prevents projects that are not supplying
// work from running away too quickly.
// They will still accumulate LT debt when we are not asking.
// exception for rpc time and don't request work
// is work being processed currently
//
double current_work = ettprc(p,0);
if (!p->suspended_via_gui && ((p->min_rpc_time < now && !p->dont_request_more_work) || current_work > 0)) {
p->long_term_debt += debt_inc;
}
total_long_term_debt += p->long_term_debt; total_long_term_debt += p->long_term_debt;
if (!p->next_runnable_result) { if (!p->next_runnable_result) {
p->debt = 0; p->debt = 0;
p->anticipated_debt = 0; p->anticipated_debt = 0;
} else { } else {
p->debt += debt_inc; p->debt += debt_inc;
if (first) { if (first) {
first = false; first = false;