From 4cb34a123aacfaccc28b5f1f76717864b0b63a57 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 5 Jul 2013 20:48:35 -0700 Subject: [PATCH] client: don't apply CPU throttling to apps that use < .5 CPUs (like GPU, NCI) --- client/app_control.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/app_control.cpp b/client/app_control.cpp index c0bbeedb99..cf97ee6260 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -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;; }