Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb4b2d05 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

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
parent 039dcadc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();