Age | Commit message (Collapse) | Author |
|
To send ADPF_FIRST_FRAME hint when reportWorkDurations was called first
time after stale state.
Bug: 243025173
Test: PtsUiBench & CUJ
Change-Id: I4377b1f549646bcf44bdf26b2657b7bc0646f9a4
Merged-In: I4377b1f549646bcf44bdf26b2657b7bc0646f9a4
|
|
Send a hint only when the system can support the hint.
Bug: 243025173
Test: PtsUiBench & CUJ
Change-Id: If56d0c22f8dd61f5fe27ba79f08f2963269abe41
Merged-In: If56d0c22f8dd61f5fe27ba79f08f2963269abe41
|
|
The main problem is the timer thread could be woken after the session
was destroyed. We did have a closed flag which was set in destructor and the flag would be checked before handleMessage accessing the session
instance. To fix the problem, the operations of flag checking and session instance accessing should be guarded by the lock.
Bug: 236674672
Test: manual test
Change-Id: I49a18efbc135b1bc070b101038a8a0bcc6e19fec
|
|
Add some basic control logic into libperfmgr to disable or enable certain actions.
"EnableProperty" can be set by external process or internally by PropertyNode, if
not assigned or set, action is enabled by default.
Bug: 241054358
Test: /data/nativetest64/libperfmgr_test/libperfmgr_test
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I5742bb901492f2675c5c88d9b09c1072ded8432a
|
|
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
|
|
For DISPLAY_UPDATE_IMMINENT wakeup signal, non-stale
session's timer should be also extended. This resolves
the performance issue caused those sessions to go stale
prematurely.
Bug: 241621485
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I06330e064060248bb556ae35e0cb8fd302cef231
|
|
post the task into a looper thread.
Bug: 232992641
Test: Manually playing UIBench -> Transitions -> ActivityTransition
Change-Id: Ibd241834f904b4c87a51363e766e110d2818d496
|
|
Separate Stale and EarlyBoost handlers and refine the code.
Test: adb shell dumpsys android.hardware.power.IPower/default
Test: Manual
Bug: 232992641
Change-Id: I81a4fd96fb7311ae5bbb7cbabe72378c9cad4aa3
|
|
We need to be holding the session lock when we dereference mDescriptor
since mDescriptor is destroyed when the session is closed. This patch
takes the session lock and verifies if it's still open during wakeup.
Test: vts run -m VtsHalGraphicsComposerV2_4TargetTest
Bug: 232992641
Change-Id: I4000a85bf2932cfdcddd3006d671a3c91ed32c48
|
|
* changes:
ADPF: dump ADPF session info
ADPF: uclamp.min integration
ADPF: Add UclampMinInit in ADPF profile
|
|
Dump current ADPF profile and ADPF session list into bugreport.
Bug: 204444691
Test: adb root && adb shell dumpsys android.hardware.power.IPower/default
Test: gpaste/6469309887938560
Change-Id: I17c0d615051f5e51c2e1fe99d17c402f9a65679a
|
|
Integrate the uclamp.min across sessions.
Add UClampMininit as the display update boost
Bug: 232313238
Test: Manual test
Change-Id: I601f407b0b5383a1e39eac448d45cbaaeb7788fb
|
|
For display hints, adding UclampMinInit as boost value.
Bug: 198663407
Test: manual test
Change-Id: Ie110e9ecbf01c2d5047a006fed02bf61aed53e0d
|
|
|
|
When choose a new throttle option, we:
1. Send the new hints.
2. Cancel the old hints.
After b/230316778, we also sometimes do this when the hint *doesn't
change*, so we can "refresh" the hint if it's about to expire.
This send & immediately cancels the same hints, which essentially just
cancels the hint.
The solution is to only do step #1 from above when refreshing the hint.
Bug: 232782573
Test: manual
Change-Id: I2a6d83a29b683d7e1f8d71b8fff700b51d1839cf
|
|
No need to prevent uclamp.min update rate by Granularity.
There is no perf impact.
Bug: 232336917
Test: /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: Iec836709bb1b9b3f1ae5d0e93bbe677a06bf0475
|
|
This is causing session update skipped and stuck.
Bug: 232336917
Test: /data/nativetest64/libperfmgr_test/libperfmgr_test
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I8928b6f6a60dcf8d21e60228a74d3aa0ab792eff
|
|
|
|
Currently PowerHAL does not distinguish between system processes and
apps when deciding whether to apply universal boost. This patch
distinguishes system sessions and app sessions and ignores system ones,
making the disabling of universal boost dependent on the presence of app
hint sessions.
Bug: b/230511824
Test: manual
Change-Id: I08dea29b3a45f2ba69ed99a9f188fa83ba143423
|
|
Add require_root: true to libperfmgr_test, as it fails to set system
properties otherwise. Also delete the TEST_MAPPING file as it has no
effect.
Bug: 226554297
Bug: 219861370
Test: atest libperfmgr_test
Change-Id: Ib9d69fbe68203c4ce8181e76fb0747bd5bbb0595
Merged-In: Ib9d69fbe68203c4ce8181e76fb0747bd5bbb0595
|
|
If we repeatedly send the same hint (as we do in lab test to constantly
throttle) then we will only send the hint once, as we don't send a hint
if the hint doesn't change. The timeout still applies to these hints,
resulting in the hint only lasting 2s, despite being consistently
renewed.
This problem is unlikely to significantly effect ACPU, as we often
change the throttle level more frequently than every 2s. However, this
will still have some impact.
Thanks vvaldes@ for spotting this!
Bug: 230316778
Test: manual
Change-Id: I255cfcfbd732782cfa60f2b86d785ef4d62d3ead
|
|
Remove ALOGD logs.
Bug: 230205812
Test: adb shell logcat -b all | grep libperf
Change-Id: I4125afec526b76e3905e75c22fc2bfb555810fa8
|
|
|
|
|
|
Bug: 227811781
Test: Build
Change-Id: I94670429ede032703661ee8eb8b1ea6456f5cbd5
Signed-off-by: Wei Wang <wvw@google.com>
|
|
Bug: 219861370
Test: atest
Change-Id: I213f37d870dbd3011c1e2e01aeebfa15c39495e6
(cherry picked from commit c8c1dc41875a2583c0606141759fdeac3a17238c)
Merged-In: I213f37d870dbd3011c1e2e01aeebfa15c39495e6
|
|
|
|
Performance shows ~7% reduction in CPU drain, and ~1% increase in missed
deadlines. We will experiment with this model in teamfood.
Bug: 192553577
Test: m & flash
Change-Id: I76129528c065b2cf50dca97eda22d5b80437c3a8
|
|
Add Early Hint feature and integrate with Stale Timer
Bug: 198379880
Test: build and manual test
Change-Id: I17009ee5b9ff922a79ccf5cb68be5b959038267d
|
|
1. Use Adpf Profile to replace system-property-based PID tunnables.
2. Add a tunable for switch PID on/off
3. Switch Adpf Profile by hint name (ex: REFRESH_120FPS)
Bug: 202158746
Bug: 204444691
Bug: 206061061
Test: Build
Change-Id: Ia673a6bf64d40128ca1797d1e26fe564b3b35ff1
|
|
Add the following function to support ADPF profiles
HintManager::ParseAdpfConfigs,
HintManager::setAdpfProfile,
HintManager::getAdpfProfile functions
Bug: 202158746
Test: make libperfmgr_test -j100 && adb push \
out/target/product/raven/data/nativetest64/libperfmgr_test/libperfmgr_test \
/data/nativetest64/libperfmgr_test/libperfmgr_test \
&& adb shell /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: Ib7194eabc9c110de36c5ee7cc1fff9020d1c8175
|
|
Considering the previous uclamp.min value is the base of PID output.
Instead of:
`next_min = std::min(sUclampMinHighLimit, output);`
We should use:
`next_min = std::min(sUclampMinHighLimit, current_min + output);`
When session status entered stale state, set the uclamp to 0, but keep
the current_min. That would be helpful for boosting the heavy workload
of the first few frames.
Bug: 204444691
Test: build && manual test
Change-Id: Idb19e2bfd8e9522fae5fd452b1fcc58786e96e65
|
|
HintManager is unique and widely used in many different components.
This is for making it easiler to be reloaded for debugging.
Bug: 172285365
Test: adb push \
out/target/product/raven/data/nativetest64/libperfmgr_test/libperfmgr_test \
/data/nativetest64/libperfmgr_test/libperfmgr_test && \
adb shell /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: I3affdfe780073ebbc50fac7bfbdd1530ee9dc8c2
|
|
There is no history kept in powerhint session, so let us just keep what
we have in the PID controller and let new samples settle.
Bug: 227003278
Test: Build
Change-Id: Ia8b9a0be288389ec36ac35c668aca013d470c257
|
|
|
|
1. Clean all messages before add new.
2. Insteading of using `this`, use the unique mStaleHandler sp so Looper
can hold the sp to keep the instance alive until the last message
done.
Test: Manual Test
Bug: 219965773
Change-Id: Ic039146f0b966c1f27d86b121d4b72b75ff360e5
|
|
This seems to happen very rarely. Submitting this client-side fix which
can be rolled back if we find a root cause.
Test: atest libadaptivecpu_test:KernelCpuFeatureReaderTest
Bug: 219960248
Change-Id: Ibbb54e94a7dbea42adf016bcbbc5f3d9fc63f9c9
Merged-In: Ibbb54e94a7dbea42adf016bcbbc5f3d9fc63f9c9
(cherry picked from commit a0d958ddbe4bff7150744d87ea7fa1c9fbf2db0a)
|
|
See b/222438951 for justification.
When model.inc is interpretting this enum, I think it should treat
UNKNOWN as e.g. RAVEN, so the model can still do something sensible.
I've left that to the model-side to make debugging the non-model code
easier.
Test: manual validation of counters: http://screen/Az9viP9e25eWQgL
Bug: 222438951
Change-Id: Id648b23d7bee4c34cdf077e93cf4a932265673c7
Merged-In: Id648b23d7bee4c34cdf077e93cf4a932265673c7
|
|
Bug: 188770301
Test: none
Change-Id: I45aa2d355c9e8f671db7dc4cd96f4c9f783f24f9
|
|
vvaldes@ has been retraining the model for Pixel 6 Pro. While this won't
be the final model, having a sensible model means we can start running a
coin flip experiment & test our field infra.
As this will take a while to make it to daily/weekly builds, I'd like to
submit this ASAP so we can kick off experiments in 1-2 weeks.
Bug: 192553577
Test: m
Change-Id: Ic15f67eb5c6700b78c4929bdad1880d5de44407f
|
|
Bug: 188770301
Test: m
Change-Id: I3a926d7a3573887a6ef31f728dc91875380d7a57
Merged-In: I3a926d7a3573887a6ef31f728dc91875380d7a57
(cherry picked from commit 7be08e5009d04787ae9a4a54c987cbf09b1e957c)
|
|
Bug: 219743541
Test: atest libadaptivecpu_test:ModelTest
Change-Id: I57eb81d9d21e5a1c36391d9427614c78147eafac
Merged-In: I57eb81d9d21e5a1c36391d9427614c78147eafac
(cherry picked from commit 0bedc2ac715eb30a408a7406a500b535a9285728)
|
|
Because we weren't clearing the properties, this was hiding some
implementation issues.
Test: atest libadaptivecpu_test:AdaptiveCpuConfigTest
Bug: 219743541
Change-Id: I58a32a1fec8d6029fd69c04a7799038fd01228bd
Merged-In: I58a32a1fec8d6029fd69c04a7799038fd01228bd
(cherry picked from commit 87834c2ce78de02e6895d284a751bc3be442d962)
|
|
Test: manual
Bug: 219743541
Change-Id: Id8bf90497c1f4861cc11b3eba26b553f0c917072
(cherry picked from commit 3fede27cdb909bddf362e3800d47aefae5e57643)
|
|
We'll need this config for collecting traces in the field. These will
need to (rarely) randomly throttle, but if we're training a model to use
a subset of the actions (e.g. just NO_THROTTLE and THROTTLE_70) then we
don't want randomly choose other actions (e.g. THROTTLE_80).
Also, instead of just logging a warning, fail if the random throttle
probabilty >100%.
Test: atest libadaptivecpu_test:AdaptiveCpuConfigTest
Bug: 219743541
Change-Id: Ie51bd5a4641176998a07d5ccea4933fbd50ef6eb
Merged-In: Ie51bd5a4641176998a07d5ccea4933fbd50ef6eb
(cherry picked from commit 43e7ec180a428669962aa27e751f413fc86cd9eb)
|
|
Fix the following two testcases:
FileNodeTest.DumpToFdTest
PropertyNodeTest.DumpToFdTest
Bug: 206981628
Test: adb shell /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: Ib8e6ac3c41c687857bb0b93632fcbb79efc2d780
|
|
An init trigger would restart powerhal as early as the property was
loaded and it is hopefully early than any clients would try to connect.
Also remove the obsolete restart hook with audio.
Bug: 218872105
Test: boot
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ib55897f65709a963016b729f213718aae5af8e8c
|
|
|
|
Add a bool property `vendor.powerhal.config.debug`.
Power HAL would use `/data/vendor/etc/powerhint.json` when vendor.powerhal.config.debug = true.
Bug: 218872105
Bug: 206061061
Test: adb wait-for-device root; adb shell mkdir -p /data/vendor/etc/;
adb push powerhint_mod.json /data/vendor/etc/powerhint.json
Test: adb shell setprop vendor.powerhal.config.debug true && \
adb shell getprop vendor.powerhal.config.debug && \
adb shell stop vendor.power-hal-aidl && \
adb shell start vendor.power-hal-aidl && adb shell stop && adb shell start
Test: adb pull /data/local.prop ; vim local.prop
+ vendor.powerhal.config.debug=true
Test: adb wait-for-device root && adb shell perfetto -o \
/data/misc/perfetto-traces/trace_file.perfetto-trace -t 20s sched freq \
idle am wm gfx view power hal && \
adb pull /data/misc/perfetto-traces/trace_file.perfetto-trace trace_profile_debug.pftrace
Change-Id: Ibaf5df280b989a8268efce1e3ab9a3f1e5510800
|
|
This means we can just seek & read in the main loop. This speeds up
feature collection 2x.
Bug: 207662659
Test: atest libadaptivecpu_tests:KernelCpuFeatureReaderTest
Change-Id: Ie9259ffea19bb9d10196b9ced5543581e1f80734
|