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

Merged
merged 2 commits into from Aug 16, 2018

Conversation

Projects
None yet
4 participants
@c1728p9
Contributor

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 some commits Jul 25, 2018

Don't reschedule ticker while dispatching
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.
Remove unnecessary low power ticker rescheduling
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- Jul 26, 2018

@cmonr

cmonr approved these changes Aug 14, 2018

@cmonr cmonr requested a review from kjbracey-arm Aug 14, 2018

@cmonr cmonr added needs: CI and removed needs: review labels Aug 14, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 14, 2018

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

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 14, 2018

CI issue last night. Restarting.

/morph test

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 15, 2018

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

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: CI labels Aug 16, 2018

@cmonr cmonr merged commit f62e103 into ARMmbed:master Aug 16, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 793 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9622 cycles (-62 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7600 from c1728p9/remove_unnecissary_low_p…
…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