Skip to content

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

Merged

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Jul 26, 2018

Description

This PR is an optimization to prevent the tickers, particularly the low power ticker, from being rescheduled unnecessarily.

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

c1728p9 added 2 commits July 25, 2018 23:24
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"
@c1728p9 c1728p9 requested a review from pan- July 26, 2018 04:25
@cmonr cmonr requested a review from kjbracey August 14, 2018 00:43
@cmonr
Copy link
Contributor

cmonr commented Aug 14, 2018

@pan- @kjbracey-arm Mind taking a look?

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 14, 2018

Build : SUCCESS

Build number : 2788
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7600/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Aug 14, 2018

@cmonr
Copy link
Contributor

cmonr commented Aug 14, 2018

CI issue last night. Restarting.

/morph test

@mbed-ci
Copy link

mbed-ci commented Aug 14, 2018

@cmonr
Copy link
Contributor

cmonr commented Aug 15, 2018

Unclear whether CI failure is caused by PR or CI load.
/morph test

@mbed-ci
Copy link

mbed-ci commented Aug 16, 2018

@cmonr cmonr merged commit f62e103 into ARMmbed:master Aug 16, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
…ower_ticker_rescheduling

Remove unnecessary low power ticker rescheduling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants