feat(linux): s2idle: Document the mode selection logic#641
feat(linux): s2idle: Document the mode selection logic#641DhruvaG2000 wants to merge 2 commits intoTexasInstruments:masterfrom
Conversation
kwillis01
left a comment
There was a problem hiding this comment.
It might be good to see if there are other places in the previous parts of the doc that can be updated or that the new info can loop into and consolidate.
995b85e to
6209735
Compare
kwillis01
left a comment
There was a problem hiding this comment.
Mostly looks good, I think that the QoS Latency Constraints and Mode Selection section needs to be fixed up to flow better and be a little more condensed.
|
Additionally, could you update the RTC + DDR section in |
6209735 to
8532d2e
Compare
|
New warnings found with rstcheck: |
8532d2e to
27dc856
Compare
|
New warnings found with rstcheck: |
Document the mode selection logic using the s2idle flow Signed-off-by: Dhruva Gole <d-gole@ti.com>
Add mention of the s2idle based mode selection being part of low power mode support as of this release Signed-off-by: Dhruva Gole <d-gole@ti.com>
3de7535 to
f4ad757
Compare
kwillis01
left a comment
There was a problem hiding this comment.
It might be good to put explicit instructions on how to enter RTC + DDR via s2idle (besides the constraint setting) in pm_am62lx_low_power_modes. It would give users a quick way to grab the instructions and go.
| If regular [mem] interface is selected in `/sys/power/mem_sleep`, the RTC Only + DDR low power mode requires special steps | ||
| to enter. The steps are documented in :ref:`am62l_suspend_workarounds`. | ||
|
|
||
| RTC Only Plus DDR |
There was a problem hiding this comment.
Why was this moved? The note added should be in the RTC + DDR section not before it.
There was a problem hiding this comment.
Why should it be only in the RTC +DDR section? The note applies to low power mode selection in general. I feel it should belong at the top and hence this was done intentionally.
| Please go through the s2idle docs to understand how to select between multiple low power modes. | ||
| The steps and overall architecture/ sequence diagrams are documented in :ref:`pm_s2idle_psci`. | ||
| The default mode via s2idle is RTC Only Plus DDR, since it's the deepest. | ||
| If regular [mem] interface is selected in `/sys/power/mem_sleep`, the RTC Only + DDR low power mode requires special steps |
There was a problem hiding this comment.
Are we supporting users to use the work around as well as s2idle?
| 3. Only idle states with ``exit-latency-us + entry-latency-us`` ≤ constraint are considered | ||
| 4. The deepest eligible state is selected | ||
|
|
||
| **Selecting Specific Low-Power Modes:** |
There was a problem hiding this comment.
Could you make an explicit mention of /dev/cpu_wakeup_latency here? I think it would be confusing to someone reading this section where QoS constraint is set, but which one?
There was a problem hiding this comment.
okay will add that
|
|
||
| Execute this in a subshell to avoid accidentally keeping it open indefinitely. | ||
|
|
||
| **How It Sets QoS Constraints:** |
There was a problem hiding this comment.
The explanation in this section would make more sense under the How QoS Constraints Work section. Explaining this constraint AFTER giving an example with it doesn't make much sense. This explanation would help set the stage for the examples given in this section.
| - ``syscore_suspend/resume()`` **called** (saves critical platform state) | ||
|
|
||
| * - **Driver Suspend** | ||
| - Same device PM callbacks as deep sleep |
There was a problem hiding this comment.
Since we can have both deep sleep and RTC+DDR using s2idle, mentioning specifically deep sleep might create confusion
There was a problem hiding this comment.
removing this entirely, since it's not a difference
| - **cpuidle**: Uses the standard CPUidle framework. Additionally, each driver is made idle by calling respective runtime suspend hooks. | ||
| - **suspend_ops**: Uses driver specific suspend operations before ``PSCI_SYSTEM_SUSPEND`` is called. | ||
| No governors exist to make any decisions. | ||
| .. list-table:: S2Idle vs Deep Sleep Comparison |
There was a problem hiding this comment.
is this table for the deep(mem) path or deep sleep mode specifically
| For complete Device Tree definitions including all latency parameters, refer to the platform's | ||
| device tree source files (e.g., ``k3-am62l3-evm-idle-states.dtso``). | ||
|
|
||
| Understanding the Suspend Parameters |
There was a problem hiding this comment.
The 2 parameters could be clubbed together, since most of the information is repeated other than the State-ID
|
|
||
| .. code-block:: bash | ||
|
|
||
| exec 4<>/dev/cpu_wakeup_latency; echo 0x3e8 >&4 |
There was a problem hiding this comment.
Might want to keep the value same as in the above example
|
@DhruvaG2000 can you re-spin after checking comments from @kwillis01 @ti-scaria |
Document the mode selection logic using the s2idle flow