mirror of https://github.com/BOINC/boinc.git
- client: fix divide-by-zero bug in calculation of priority
of projects with zero resource share svn path=/trunk/boinc/; revision=25127
This commit is contained in:
parent
7f7d734718
commit
f4b8f357bb
|
@ -883,3 +883,10 @@ David 22 Jan 2012
|
|||
makefile
|
||||
client/
|
||||
net_stats.cpp
|
||||
|
||||
David 22 Jan 2012
|
||||
- client: fix divide-by-zero bug in calculation of priority
|
||||
of projects with zero resource share
|
||||
|
||||
client/
|
||||
cpu_sched.cpp
|
||||
|
|
|
@ -653,10 +653,11 @@ void PROJECT::compute_sched_priority() {
|
|||
// than those with positive resource share
|
||||
//
|
||||
if (resource_share == 0) {
|
||||
sched_priority = -1e6 - rec_frac;
|
||||
}
|
||||
sched_priority = -1e3 - rec_frac;
|
||||
} else {
|
||||
sched_priority = - rec_frac/resource_share_frac;
|
||||
}
|
||||
}
|
||||
|
||||
// called from the scheduler's job-selection loop;
|
||||
// we plan to run this job;
|
||||
|
|
Loading…
Reference in New Issue