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

Improve scheduling configuration of examples_rclcpp_cbg_executor package #331

Merged
merged 2 commits into from
Feb 18, 2022
Merged

Improve scheduling configuration of examples_rclcpp_cbg_executor package #331

merged 2 commits into from
Feb 18, 2022

Conversation

ralph-lange
Copy link
Contributor

Chose the configuration of the high prio Executor thread to be below typical threaded interrupt handlers. Explained scheduling configuration in the code.

…Linux and QNX. Chose the configuration to be below typical threaded interrupt handlers.

Signed-off-by: Ralph Lange <ralph.lange@de.bosch.com>
…periment results.

Signed-off-by: Ralph Lange <ralph.lange@de.bosch.com>
@adityapande-1995
Copy link
Contributor

CI :

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@adityapande-1995
Copy link
Contributor

A small question : why are we changing the existing scheduling priority in this example ? Was that causing some problems, or this is just an enhancement ? cc @wjwwood

@ralph-lange
Copy link
Contributor Author

The motivation of changing the priorities was to have a more realistic example. In Linux, interrupt threads often get priority 50, i.e., exactly (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2.

I expect that in most real-world ROS-based application, priorities below this value are sufficient. The original priority of sched_get_priority_max(SCHED_FIFO) for the high-priority thread in this example is completely exaggerated, cf. my talk at last year's ROS World workshop on execution management (video, slides).

Please note that I implemented the examples_rclcpp_cbg_executor package, i.e., I'm correcting myself with this PR :-)

Copy link
Contributor

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification !

@adityapande-1995 adityapande-1995 merged commit 2c9e936 into ros2:master Feb 18, 2022
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 this pull request may close these issues.

None yet

3 participants