+1
−1
+1
−1
+4
−3
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
The wake lock callouts go through JNI and then across Binder to PowerManager. As a result, the cost of each callout is very high. There are cases where the stack is acquiring and releasing the wake lock tens of times per second. When that happens, the CPU load on some devices can reach 100% and the RFCOMM throughput can drop by 50% or more. This change reduces the cost of acqiring / releasing a wake lock. Instead of JNI + Binder + PowerManager overhead, we simply write to the /sys/power/wake_lock and /sys/power/wake_unlock nodes. The cost of each is a single syscall. Bug: 23375670 Change-Id: I760a86b557b02c3d70be7a902c943b7ee2f515b1