client: don't apply CPU throttling to apps that use < .5 CPUs (like GPU, NCI)

This commit is contained in:
David Anderson 2013-07-05 20:48:35 -07:00
parent 417b26c7b4
commit 4cb34a123a
1 changed files with 3 additions and 2 deletions

View File

@ -1059,9 +1059,10 @@ void ACTIVE_TASK_SET::suspend_all(int reason) {
if (reason == SUSPEND_REASON_CPU_THROTTLE) {
if (atp->result->dont_throttle()) continue;
// if we're doing CPU throttling,
// don't suspend CPU apps that use < 1 CPU
// don't suspend apps that use < .5 CPU (like GPU and NCI apps)
//
if (!atp->result->uses_coprocs() && atp->app_version->avg_ncpus < 1) continue;
if (atp->app_version->avg_ncpus < .5) continue;
atp->preempt(REMOVE_NEVER);
continue;;
}