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

Commit aa5aeb74 authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

DO NOT MERGE Directly acquire wake locks from the Bluetooth stack.

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
parent be76179d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment