-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys: xtimer concurrency/robustness improvement #9530
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
sys: xtimer concurrency/robustness improvement #9530
Conversation
d4dacd5
to
019f915
Compare
27219b7
to
caf66f3
Compare
7e7a4ac
to
9548ec4
Compare
9548ec4
to
3f3df74
Compare
489985c
to
a672186
Compare
All checks have passed. |
@MichelRottleuthner so would you say this is ready now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MichelRottleuthner so would you say this is ready now?
Yes let's finally do this. I give my ACK.
Thank you all for helping!
We should still have a close look and watch out very carefully for any suspicious behavior that could be related to regressions or hidden bugs in the upcoming release tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK!
For sure. Thanks for all the work and patience @Hyungsin! |
@MichelRottleuthner I let you pull trigger! |
@MichelRottleuthner this PR removed #11992 |
Can you file a PR for that again? We need a proper automated regression test for that. |
Contribution description
This PR tries to resolve concurrency/robustness problem of xtimer, an attempt to escape from long suffering of xtimer's unrobustness. I personally have experienced frequency system crash due to xtimer. As an embedded OS, RIOT can have a little timing error but must avoid system crash to enable long-term attended operation of embedded devices.
The basic idea is to change xtimer operation from "absolute target-based" to "period-based", which is the case of TinyOS. Timer expiry and current time update are based on "offset" rather than "absolute target". An absolute target value is used only for sorting timers chronologically and setting a lltimer. I personally tested this PR with a Hamilton board and xtimer test applications in 'tests' folder. But further test might be needed.
I'm aware of other ongoing effort for fixing xtimer. I'm just throwing another option here since I have some time to focus on this issue now, and leave the decision whether to merge this PR with reviewers. @kaspar030, @gebart, This PR is the one I mentioned earlier about xtimer.
The next step would be reworking on #7053, with a simpler implementation.
Issues/PRs references
#5428, #6937, #9211, #9491