Skip to content

Commit

Permalink
power-libperfmgr: Remove cpu_load_up relative boost to PID
Browse files Browse the repository at this point in the history
Increasingly, cpu_load_up exists as a tool to boost stray expensive
frames rather than to increase the PID setpoint, so this change reflects
that and seeks to prevent power regressions in its use towards this goal

Bug: 261130508
Test: manual
Change-Id: I6608f92decbdfc59d92b4e5716a75b323c1d2c3e
  • Loading branch information
AndroidMatt1 authored and rayavanindra committed Jul 20, 2024
1 parent d6de212 commit f01629c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions power-libperfmgr/aidl/PowerHintSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,10 @@ ndk::ScopedAStatus PowerHintSession::sendHint(SessionHint hint) {
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
disableTemporaryBoost();
// The amount we boost threads that have unexpected workloads
// Consider adding this value to the powerhint.json and using that value directly
constexpr int kRelativeBoost = 150;
std::shared_ptr<AdpfConfig> adpfConfig = HintManager::GetInstance()->GetAdpfProfile();
switch (hint) {
case SessionHint::CPU_LOAD_UP:
mNextUclampMin.store(
std::min(adpfConfig->mUclampMinHigh,
static_cast<uint32_t>(mDescriptor->current_min + kRelativeBoost)));
mNextUclampMin.store(mDescriptor->current_min);
mBoostTimerHandler->updateTimer(mDescriptor->duration * 2);
setSessionUclampMin(adpfConfig->mUclampMinHigh);
break;
Expand Down

0 comments on commit f01629c

Please sign in to comment.