-
Notifications
You must be signed in to change notification settings - Fork 418
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
Foxy: backport mutex_two_priorities #1516 #1636
Foxy: backport mutex_two_priorities #1516 #1636
Conversation
Signed-off-by: hsgwa <hasegawa@isp.co.jp>
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.
thanks for opening discussion here and contribution. actually MutexTwoPriorities
has been update via #1628 by @ivanpauno . so if we possibly do backport to foxy, probably rebase on #1628 would be better.
Signed-off-by: hsgwa <hasegawa@isp.co.jp>
Signed-off-by: hsgwa <hasegawa@isp.co.jp>
Thanks for the information! |
I see. I didn't test it enough. |
Sure, there is a risk because the variables are not encapsulated. Or, how about changing them from member variables to static global variables in multi_threaded_executor.cpp?
At any rate, the test results look fine. I compared single-threaded and multi-threaded executor, ref: #1487 (comment). Comparison: Multi-threaded Executorpublish rate
%CPUThe following is a comparison of the %cpu columns of pidstat.
Comparison: Single-threaded Executor
%CPU
Comparison: timer_over_take testI compared the
|
Instead of that, could you repeat the test to see if it's flaky or not? stress --cpu 8 & # use number of cores instead of 8
for i in {1..100}; do ./test_multi_threaded_executor; if [ $? -ne 0 ]; then break;fi;clear; done Thanks! |
I tried to test it in a loop 100 times, but it failed in the middle.
To check the effect before and after the modification, I executed the following commands 10 times each and counted the number of consecutive successful tests.
Both failed in the middle of the test, so there seems to be no obvious difference.
|
@jacobperron friendly ping. could you give me a review if you don't mind? |
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.
This is a backport of #1516
This change is somewhat aggressive, but this change will greatly improve MultiThreadedExecutor performance.
I added static variables, so it should be ABI compatible.
I would appreciate any comments.
related issues: #1618, ros-controls/ros2_control#275
Signed-off-by: hsgwa hasegawa@isp.co.jp