Skip to content
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

Cellular: Fix queue scheduling for bare metal #11859

Merged
merged 1 commit into from Nov 16, 2019

Conversation

@kivaisan
Copy link
Contributor

kivaisan commented Nov 13, 2019

Description (required)

Cellular event queue was not dispatched at all in case of bare metal build. This commit fixes the problem by chaining cellular queue with shared event queue.

Summary of change (What the change is for and why)
Documentation (Details of any document updates required)

Pull request type (required)

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results (required)

[X] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers (optional)

@AriParkkila @AnttiKauppila


Release Notes (required for feature/major PRs)

Summary of changes
Impact of changes
Migration actions required
For non-rtos build (bare metal) cellular event queue is now scheduled by shared event queue.
@ciarmcom ciarmcom requested review from AnttiKauppila, AriParkkila and ARMmbed/mbed-os-maintainers Nov 13, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Nov 13, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Nov 13, 2019

CI started

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Nov 13, 2019
@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Nov 13, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test
@kivaisan

This comment has been minimized.

Copy link
Contributor Author

kivaisan commented Nov 14, 2019

Greentea test fail does not seem to relate this PR.

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

kjbracey-arm commented Nov 14, 2019

This makes me nervous that you're going to cause large scheduling delays on the shared event queue (which has a guideline of <~100ms event duration) while waiting for an AT command response. Wasn't that the reason for having a separate event queue thread in the RTOS build in the first place?

Still, large scheduling delays are better than nothing working at all. And I suspect you may have occasionally ended up blocking the shared event queue waiting for an AT mutex anyway even in the RTOS setup.

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Nov 14, 2019
@bulislaw

This comment has been minimized.

Copy link
Member

bulislaw commented Nov 15, 2019

We have some changes queued to backport (uhm it sounds easier than it will be) to introduce standard/high priority levels for the bare metal queue past Mbed 6. That should allow us to make sure higher priority work won't be blocked, would it mitigate this issue?

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

kjbracey-arm commented Nov 15, 2019

would it mitigate this issue?

Not if the events do "send AT command, block waiting for response", as I think they do.

Within-queue priority levels don't really help that much (in general), because the responsiveness is determined by the longest-running event on a queue.

You can't pre-emptively stop a slow low-priority event from running when someone queues a high-priority one.

Priority levels can be useful, but only if both high and low priority events have similar execution time. Eg in Nanostack we did the work to have long-running crypto (on slow 16-bit platforms) break itself up into fraction-of-a-second units, and schedule that repeatedly at low priority.

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Nov 15, 2019
@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Nov 15, 2019

CI started

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Nov 15, 2019

deadcee

Nice sha there , noticed while checking SHA for CI 😄

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Nov 15, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit cb54f50 into ARMmbed:master Nov 16, 2019
27 checks passed
27 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/jenkins/pr-merge Manually fixed status
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+72 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8618 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8420B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.