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

isolcpus and taskset for multithreaded executor #65

Open
hyos opened this issue Oct 16, 2021 · 3 comments
Open

isolcpus and taskset for multithreaded executor #65

hyos opened this issue Oct 16, 2021 · 3 comments
Assignees
Labels
benchmarks enhancement New feature or request

Comments

@hyos
Copy link
Contributor

hyos commented Oct 16, 2021

README.md suggests using isolcpus=2,3 and gives an example of how to run a single-threaded executor on CPU2 by taskset -c 2.

But there is a problem when someone wants to test a multi-threaded executor. isolcpus basically disables load balancing, so a process can use only one CPU even if ran with taskset -c 2,3. For a process to use multiple isolated CPUs, RT priority class (e.g., SCHED_FIFO) is needed since the Linux RT scheduler performs like a global work-conserving scheduler for all assigned CPUs. In short, we need something like:

taskset -c 2,3 chrt -f 90 <path_to_multithreaded_executor>

I guess colcon test scripts need to be updated so that, when TEST_PLATFORM is enabled, it runs executors with taskset and chrt.

@razr
Copy link
Member

razr commented Oct 16, 2021

@hyos do you want to provide a PR for it?

@hyos
Copy link
Contributor Author

hyos commented Oct 16, 2021

@razr I am not sure exactly which part of the script needs to be modified. Can someone help?

@flynneva
Copy link
Collaborator

@hyos @razr it should be the command within the cmake scripts either in the generate_traces.cmake script in the cmake directory or in the main CMake file of autoware_reference_system.

I think the right way to implement this would be to add a cmake arg to enable / disable the use of it.

I can look into this tomorrow if no ones implemented it by then

@flynneva flynneva self-assigned this Oct 23, 2021
@flynneva flynneva added the enhancement New feature or request label Oct 23, 2021
@carlossvg carlossvg moved this to Todo in RTWG roadmap Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmarks enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

4 participants