-
Notifications
You must be signed in to change notification settings - Fork 7.3k
pm: Optimize power state selection with early exit when no state is available #88149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,11 @@ bool pm_system_suspend(int32_t kernel_ticks) | |
|
||
SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, kernel_ticks); | ||
|
||
if (!pm_policy_state_any_active()) { | ||
/* Return early if all states are unavailable. */ | ||
return false; | ||
} | ||
|
||
Comment on lines
+151
to
+155
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This if breaks the functionality provided by the /**
* @brief Force usage of given power state.
*
* This function overrides decision made by PM policy forcing
* usage of given power state upon next entry of the idle thread.
*
* @note This function can only run in thread context
*
* @param cpu CPU index.
* @param info Power state which should be used in the ongoing
* suspend operation.
*/
bool pm_state_force(uint8_t cpu, const struct pm_state_info *info); My interpretation is that this function should result in overriding restrictions such as pm policy lock or max latency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've opened #89037 to fix that. |
||
/* | ||
* CPU needs to be fully wake up before the event is triggered. | ||
* We need to find out first the ticks to the next event | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add these to release notes