-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove unnecessary low power ticker rescheduling #7600
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
Remove unnecessary low power ticker rescheduling #7600
Conversation
Wait until dispatching is finished before scheduling the next ticker interrupt. This prevents unnecissary calls to set_interrupt from periodic elements being added back. This is particularly useful for the low power ticker on devices with LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low power ticker cannot be reschduled immediately and needs to fall back onto the microsecond ticker which temporarily locks deep sleep.
Schedule the next OS tick inside of the ticker interrupt rather than in the systick interrupt. Scheduling this while the ticker is dispatching prevents an unnecissary rescheduling since this rescheduling is done anyway when dispatching is finished. This is particularly useful for the low power ticker on devices with LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low power ticker cannot be reschduled immediately and needs to fall back onto the microsecond ticker which temporarily locks deep sleep. Note - the optimization in this commit is made possible by the commit: "Don't reschedule ticker while dispatching"
@pan- @kjbracey-arm Mind taking a look? /morph build |
Build : SUCCESSBuild number : 2788 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2418 |
CI issue last night. Restarting. /morph test |
Test : FAILUREBuild number : 2529 |
Unclear whether CI failure is caused by PR or CI load. |
Test : SUCCESSBuild number : 2554 |
…ower_ticker_rescheduling Remove unnecessary low power ticker rescheduling
Description
This PR is an optimization to prevent the tickers, particularly the low power ticker, from being rescheduled unnecessarily.
Pull request type