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

mmap could be done only for the corresponding message #374

Open
veqcc opened this issue Feb 12, 2025 · 0 comments
Open

mmap could be done only for the corresponding message #374

veqcc opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request low priority

Comments

@veqcc
Copy link
Contributor

veqcc commented Feb 12, 2025

After this PR, mmap is done when any of the following is called:

  • subcriber_add
  • receive_and_check_new_publisher
  • take_msg

However, they sometimes map a different process memory from the one it is trying to read.
Here is the example:

  • Publiusher 1 joins
  • Subscriber joins -> maps Publisher 1 process area
  • Publisher 2 joins
  • Publisher 1 publishes
  • Subscriber tries to read Publisher 1 message -> maps Publisher 2 process area -> read Publisher 1 message

The straightforward design is, when a subscriber tries to read a message, then it checks whether the corresponding publisher process area is already mapped, and do mmap is not.
This may be a trade off between check overhead. It should be implemented after measurements.

@veqcc veqcc changed the title mmap may be done just before reading data, not mmap could be done only for the corresponding message Feb 12, 2025
@veqcc veqcc added enhancement New feature or request low priority labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

1 participant