-
Notifications
You must be signed in to change notification settings - Fork 76
[WIP][DNM] Add s2idle docs #562
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
base: master
Are you sure you want to change the base?
Conversation
|
New warnings found with rstcheck: |
| * **System State:** (Optional) Power Down or Retention | ||
| 4. **PSCI Enforcement:** The PSCI implementation verifies that all other cores in the requested node are indeed idle. If they are not, the request is denied (to prevent race conditions). | ||
|
|
||
| ************************************* |
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.
The section identifier line should be of equal length to the section name.
| Suspend-to-Idle (s2idle), also known as "freeze," is a generic, pure software, light-weight variant of system suspend. | ||
| In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state. | ||
|
|
||
| ********************** |
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.
The section identifier line should be of equal length to the section name.
|
|
||
| ************************** | ||
| OS Initiated (OSI) Mode | ||
| ************************** |
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.
The section identifier line should be of equal length to the section name.
Document all about s2idle and PSCI and how the whole stack helps us in selecting between low power modes on the TI AM62L Signed-off-by: Dhruva Gole <d-gole@ti.com>
b935f77 to
ef4ad74
Compare
|
@cshilwant , and rest I'll mark the PR ready for review once it has undergone LPM team internal review. Till then requesting you to hold off reviews. Thanks! |
| S2Idle vs Deep Sleep (mem) | ||
| ********************************** | ||
|
|
||
| On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh). |
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.
| On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh). | |
| On ARM64 platforms, ``deep`` states (suspend-to-RAM) and ``idle`` states can achieve similar power savings. |
The eg here could be confusing since it is at the end of the sentence so it is not clear that you're referring to the deep states. Either it could be removed or the suggestion could be implemented.
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.
ack, willfix
| On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh). | ||
| The primary differences lie in the software execution flow, specifically how CPUs are managed and which PSCI APIs are invoked. | ||
|
|
||
| .. list-table:: S2Idle vs Deep Sleep (ARM64) |
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.
Is it necessary to specify ARM64 platforms since you already specified ARM64 previously and this page will (presumably) only be used in ARM64 platforms?
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.
ack, willfix
| - **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``. | ||
|
|
||
| * - **Entry Path** | ||
| - **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle. |
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.
| - **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle. | |
| - **cpuidle**: Uses the standard CPU idle framework and governance. Each driver is put into an idle state by runtime suspend. |
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.
ack, willfix
| - **Kept Online**: Non-boot CPUs are put into a deep idle state but remain logically online. | ||
| - **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``. |
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.
| - **Kept Online**: Non-boot CPUs are put into a deep idle state but remain logically online. | |
| - **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``. | |
| - **Online**: Non-boot CPUs are put into a deep idle state but remain logically online. | |
| - **Offline**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``. |
Changing it to be this way looks nicer and its easier to compare the differences imo. The explanations are good and get across the differences so the headings can become simpler
|
|
||
| * - **Entry Path** | ||
| - **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle. | ||
| - **suspend_ops**: Uses platform-specific suspend operations like each driver's suspend ops. No governor involvement. |
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.
No governor involvement. kind of makes it sound like there is a governor but it is not being used.
| ********************** | ||
|
|
||
| The Power State Coordination Interface (PSCI) is an ARM-defined standard that acts as the fundamental | ||
| enabler for s2idle on ARM platforms. PSCI defines a standardized firmware interface that allows the |
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.
Since we denote ARM64 platforms earlier in the doc, could this confuse readers to think that this only applies to ARM platforms but not ARM64 platforms?
| In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state. | ||
|
|
||
| ********************************** | ||
| S2Idle vs Deep Sleep (mem) |
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.
Wondering if this whole section should be moved to be the last / one of the last sections? I think explaining PSCI would be good to do before going into comparisons on how it operates differently than Deep Sleep
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.
ack
| 5. Thaw tasks | ||
|
|
||
| The `cpuidle` driver calls the PSCI `CPU_SUSPEND` API to transition the CPU (and potentially | ||
| higher-level topology nodes like clusters) into a low-power state. The effectiveness of s2idle |
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.
Assume the reader doesn't know what the topology nodes / clusters are. This should either be explained or the information in the parenthesis should be removed.
| 2. Suspend devices | ||
| | | ||
| v | ||
| 3. cpuidle driver -----------> CPU_SUSPEND (SMC/HVC) |
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.
What is SMC/HVC?
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.
ok will add explanation for secure monitor call.
| | Enter low-power | ||
| | hardware state |
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.
| | Enter low-power | |
| | hardware state | |
| | CPU enters low-power | |
| | hardware state |
Only suggesting this because I think the cpuidle to PSCI firmware can be a little confusing.
Document all about s2idle and PSCI and how the whole stack helps us in selecting between low power modes on the TI AM62L