- client: the max percent needs to be based on the max cpu

preference not the total number of CPUs if we are 
        actually calculating the min of both of them.
    
    client/
        cpu_sched.cpp

svn path=/trunk/boinc/; revision=16289
This commit is contained in:
Rom Walton 2008-10-23 13:59:00 +00:00
parent 6268cfd3c3
commit 727b9a19ee
2 changed files with 11 additions and 2 deletions

View File

@ -8643,4 +8643,11 @@ Rom 23 Oct 2008
lib/
prefs.cpp
Rom 23 Oct 2008
- client: the max percent needs to be based on the max cpu
preference not the total number of CPUs if we are
actually calculating the min of both of them.
client/
cpu_sched.cpp

View File

@ -1637,9 +1637,11 @@ void CLIENT_STATE::set_ncpus() {
}
if (global_prefs.max_ncpus_pct) {
ncpus = (int)((host_info.p_ncpus * global_prefs.max_ncpus_pct)/100);
ncpus = (int)((ncpus * global_prefs.max_ncpus_pct)/100);
}
if (ncpus == 0) ncpus = 1;
if (global_prefs.max_ncpus && global_prefs.max_ncpus < ncpus) {
ncpus = global_prefs.max_ncpus;
}