You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jasonbu (via GitHub)" <gi...@apache.org> on 2024/05/22 08:56:46 UTC
[PR] PM: add stability governer [nuttx]
jasonbu opened a new pull request, #12390:
URL: https://github.com/apache/nuttx/pull/12390
## Summary
only when first time change state can hold WFI for enough time thresh, allow second time goto target state,
suitable for the case when wakeup from sleep too slow, etc.
## Impact
No impact for default case,
after manually pm_set_governor(PM_IDLE_DOMAIN, pm_stability_governor_initialize()), PM_IDLE_DOMAIN will detect if can stay in WFI for enough time then allow enter the target pm state.
## Testing
qemu-v8a, and vendor specific platform.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "jasonbu (via GitHub)" <gi...@apache.org>.
jasonbu commented on code in PR #12390:
URL: https://github.com/apache/nuttx/pull/12390#discussion_r1610079477
##########
drivers/power/pm/Kconfig:
##########
@@ -77,6 +87,43 @@ config PM_GOVERNOR_EXPLICIT_RELAX
if set to timeout (unit: ms), that means pm_staytimeout(ms).
pm_relax() will be auto called after timeout.
+if PM_GOVERNOR_STABILITY
+
+config PM_GOVERNOR_STABILITY_IDLE_THRESH
+ int "Enter idle thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto idle, can remain wfi for (ticks)
+ and second time still try goto this state, goto idle,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto idle state
+ set to 0 disable stability check for idle state
+
+config PM_GOVERNOR_STABILITY_STANDBY_THRESH
+ int "Enter standby thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto standby, can remain wfi for (ticks)
+ and second time still try goto this state, goto standby,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto standby state
Review Comment:
add the missing periods will be OK? or should remove the empty line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12390:
URL: https://github.com/apache/nuttx/pull/12390#issuecomment-2124905170
@jasonbu we faced a related issue when using NuttX with Tickless mode, sometimes when some modem data arrived the UART was losing data. We discovered that the issue was caused by the long RTC wake-up time. By default STM32 chips are using prescaler as RTC clock/16, so it was generating more than 400us wake-up time. The solution was changing the WUCKSEL from 16 to 2.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #12390:
URL: https://github.com/apache/nuttx/pull/12390
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #12390:
URL: https://github.com/apache/nuttx/pull/12390#discussion_r1610031866
##########
drivers/power/pm/Kconfig:
##########
@@ -77,6 +87,43 @@ config PM_GOVERNOR_EXPLICIT_RELAX
if set to timeout (unit: ms), that means pm_staytimeout(ms).
pm_relax() will be auto called after timeout.
+if PM_GOVERNOR_STABILITY
+
+config PM_GOVERNOR_STABILITY_IDLE_THRESH
+ int "Enter idle thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto idle, can remain wfi for (ticks)
+ and second time still try goto this state, goto idle,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto idle state
+ set to 0 disable stability check for idle state
+
+config PM_GOVERNOR_STABILITY_STANDBY_THRESH
+ int "Enter standby thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto standby, can remain wfi for (ticks)
+ and second time still try goto this state, goto standby,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto standby state
Review Comment:
Please fix this broken line
##########
drivers/power/pm/Kconfig:
##########
@@ -77,6 +87,43 @@ config PM_GOVERNOR_EXPLICIT_RELAX
if set to timeout (unit: ms), that means pm_staytimeout(ms).
pm_relax() will be auto called after timeout.
+if PM_GOVERNOR_STABILITY
+
+config PM_GOVERNOR_STABILITY_IDLE_THRESH
+ int "Enter idle thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto idle, can remain wfi for (ticks)
+ and second time still try goto this state, goto idle,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto idle state
+ set to 0 disable stability check for idle state
+
+config PM_GOVERNOR_STABILITY_STANDBY_THRESH
+ int "Enter standby thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto standby, can remain wfi for (ticks)
+ and second time still try goto this state, goto standby,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto standby state
+ set to 0 disable stability check for standby state
+
+config PM_GOVERNOR_STABILITY_SLEEP_THRESH
+ int "Enter sleep thresh >= (ticks)"
+ default 0
+ ---help---
+ only if first time try goto sleep, can remain wfi for (ticks)
+ and second time still try goto this state, goto sleep,
+ otherwise keep last state
+
+ only if remained for >=(ticks), allow goto sleep state
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "jasonbu (via GitHub)" <gi...@apache.org>.
jasonbu commented on PR #12390:
URL: https://github.com/apache/nuttx/pull/12390#issuecomment-2125013093
still failing test_ltp_behavior_WIFEXITED_1_1 and test_ltp_behavior_WIFEXITED_1_2 forkcase from
[open_posix_WIFEXITED](https://github.com/linux-test-project/ltp/blob/20230516/testcases/open_posix_testsuite/conformance/behavior/WIFEXITED/1-1.c)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PM: add stability governer [nuttx]
Posted by "jasonbu (via GitHub)" <gi...@apache.org>.
jasonbu commented on PR #12390:
URL: https://github.com/apache/nuttx/pull/12390#issuecomment-2124922670
> @jasonbu we faced a related issue when using NuttX with Tickless mode, sometimes when some modem data arrived the UART was losing data. We discovered that the issue was caused by the long RTC wake-up time. By default STM32 chips are using prescaler as RTC clock/16, so it was generating more than 400us wake-up time. The solution was changing the WUCKSEL from 16 to 2.
yes, one method is to directly speed up the wakeup process. but if the chip it not able to speed it up, and greedy governor always too fast enter sleep, activity governor maybe too heavy and will take it to all domains in the project. this method first idea from CSMA, can be a option and worked for our target chip.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org