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

Replace the atomic hrt_elapsed_time call with a non-atomic call #11245

Closed
LorenzMeier opened this issue Jan 19, 2019 · 3 comments · Fixed by #11248
Closed

Replace the atomic hrt_elapsed_time call with a non-atomic call #11245

LorenzMeier opened this issue Jan 19, 2019 · 3 comments · Fixed by #11248
Assignees

Comments

@LorenzMeier
Copy link
Member

Almost nobody really need an atomic call to hrt_elapsed_time but lots of location in the code use the function as a convenience call. We should introduce an atomic option to reduce IRQ jitter and CPU load in the system.

@LorenzMeier
Copy link
Member Author

LorenzMeier commented Jan 20, 2019

Initial testing: We save ~1% CPU load with this on v5 (so about 2% CPU load on earlier hardware versions)

After fix (more CPU idle = better):
screenshot 2019-01-19 at 21 37 45

Current:
screenshot 2019-01-19 at 21 45 14

@dagar
Copy link
Member

dagar commented Jan 20, 2019

Is it easier to start from the other end and identify where hrt_elapsed_time in a critical section actually matters?

@LorenzMeier
Copy link
Member Author

I did that already, and it's pretty much 0.1% of the calls needing this. Hence instead of inducing a massive diff I would switch those over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants