Increase max system_server hwbinder threadpool to 5.
system_server hosts HIDL services, but also many different callback interfaces. Subtle deadlocks can occur if there's only one HwBinder thread to handle incoming transactions. Increasing this to 5 threads seems reasonable - we haven't really seen any performance issues due to this. The main danger with this change is that not all callback interfaces may be written in a thread-safe way, but some quick testing revealed no issues. Bug: 37531523 Bug: 37509431 Test: builds, Maps/YouTube/Camera/Music/Netflix Change-Id: I52bff2f2263625c1a33f60b8b27c307c1d31000c
This commit is contained in:
@@ -48,7 +48,7 @@ static void android_server_SystemServer_startHidlServices(JNIEnv* /* env */, job
|
||||
|
||||
status_t err;
|
||||
|
||||
configureRpcThreadpool(1, false /* callerWillJoin */);
|
||||
configureRpcThreadpool(5, false /* callerWillJoin */);
|
||||
|
||||
sp<ISensorManager> sensorService = new SensorManager();
|
||||
err = sensorService->registerAsService();
|
||||
|
||||
Reference in New Issue
Block a user