android_device_motorola_sm6.../power-libperfmgr
jimmyshiu 523949c628
sm6375-common: power-libperfmgr: ADPF: optimize the wakeup performance and fix unstable boost.
Optimize boost:
A more efficient way is to trigger the wakeup boost through mTidSessionListMap, so the time
   complexity reduce from O(n^3) to O(n^2).

The original code path:
  PSM:wakeSessions() contains a loop that is O(n),
  inside the loop, it calls to PHS::wakeup() which call to
  PSM::setUclampMinLocked(), and
  PSM::setUclampMinLocked() contains two loops O(n^2)

The new code path:
  PSM::wakeSessions() directly checks all the ADPF tasks O(n) and
  get the wakeup boost value O(n), then directly set the uclamp.min
  The time complexity lower to O(n^2).

Fix unstable boost:
The original flow is to find max boost and wake it up from stale state
one by one. But the previous woken ones would not be counted when the later ones finding their max boost value.
The new flow boost all the tasks first, then wake up all those sessions.

Bug: 235510337
Test: Manually playing UIBench -> Transitions -> ActivityTransition
Change-Id: I995673b74401e198eb72188134ba1ebc134f971c
2024-07-18 20:16:00 +05:30
..
Android.bp sm6375-common: power-libperfmgr: aidl: Remove ndk_platform backend. Use the ndk backend. 2024-07-18 20:16:00 +05:30
android.hardware.power-service.moto_sm6375-libperfmgr.rc sm6375-common: power-libperfmgr: Add global debug property for override config path properly 2024-07-18 20:16:00 +05:30
android.hardware.power-service.moto_sm6375.xml sm6375-common: power-libperfmgr: add PowerHintSession for ADPF implementation 2024-07-18 20:16:00 +05:30
InteractionHandler.cpp sm6375-common: power-libperfmgr: Make HintManager a singleton class 2024-07-18 20:16:00 +05:30
InteractionHandler.h sm6375-common: power-libperfmgr: Make HintManager a singleton class 2024-07-18 20:16:00 +05:30
Power.cpp sm6375-common: power-libperfmgr: ADPF: Fix updateHintBoost blocks the binder thread 2024-07-18 20:16:00 +05:30
Power.h sm6375-common: power-libperfmgr: ADPF: Use Adpf Profile for PID tunnables 2024-07-18 20:16:00 +05:30
PowerExt.cpp sm6375-common: power-libperfmgr: ADPF: Fix updateHintBoost blocks the binder thread 2024-07-18 20:16:00 +05:30
PowerExt.h sm6375-common: power-libperfmgr: Make HintManager a singleton class 2024-07-18 20:16:00 +05:30
PowerHintSession.cpp sm6375-common: power-libperfmgr: ADPF: optimize the wakeup performance and fix unstable boost. 2024-07-18 20:16:00 +05:30
PowerHintSession.h sm6375-common: power-libperfmgr: ADPF: Fix updateHintBoost blocks the binder thread 2024-07-18 20:16:00 +05:30
PowerSessionManager.cpp sm6375-common: power-libperfmgr: ADPF: optimize the wakeup performance and fix unstable boost. 2024-07-18 20:16:00 +05:30
PowerSessionManager.h sm6375-common: power-libperfmgr: ADPF: Fix updateHintBoost blocks the binder thread 2024-07-18 20:16:00 +05:30
service.cpp sm6375-common: power-libperfmgr: Add minimal binder thread prio as -20 to match process prio 2024-07-18 20:16:00 +05:30