summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Wang <wvw@google.com> 2019-05-20 15:53:09 -0700
committer Wei Wang <wvw@google.com> 2019-05-20 16:22:56 -0700
commitf349ccdad7ce3c320f7af38bc56efa4547653f05 (patch)
treea904acc3e8b434779570a8ffb83ab04358842b7c
parentb899f8abdd0e3a61f30b70eecce53633af13df4f (diff)
Fix SystemServerInitThreadPool size on latest device.
During boottime, we have relaxed cpuset to allow all cores to be used. This CL will give the thread pool higher chance to parallel things. Bug: 132974796 Test: Build Change-Id: I2ce0f337ce76ea918c4cce071e4bb44830d3b82b Signed-off-by: Wei Wang <wvw@google.com>
-rw-r--r--services/core/java/com/android/server/SystemServerInitThreadPool.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/SystemServerInitThreadPool.java b/services/core/java/com/android/server/SystemServerInitThreadPool.java
index 1ce655618028..ff6a5375565a 100644
--- a/services/core/java/com/android/server/SystemServerInitThreadPool.java
+++ b/services/core/java/com/android/server/SystemServerInitThreadPool.java
@@ -45,7 +45,8 @@ public class SystemServerInitThreadPool {
private static SystemServerInitThreadPool sInstance;
- private ExecutorService mService = ConcurrentUtils.newFixedThreadPool(4,
+ private ExecutorService mService = ConcurrentUtils.newFixedThreadPool(
+ Runtime.getRuntime().availableProcessors(),
"system-server-init-thread", Process.THREAD_PRIORITY_FOREGROUND);
private List<String> mPendingTasks = new ArrayList<>();