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

Shm UR ref count segment: fallback to old behaviour when segment size is set to 0 #493

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

rbx
Copy link
Member

@rbx rbx commented Nov 29, 2023

Describe your proposal.

Mention any issue this PR resolves or is related to.


Checklist:

Copy link

coderabbitai bot commented Nov 29, 2023

Walkthrough

Walkthrough

The changes across various files indicate a significant update to the shared memory management, particularly in handling reference counting for unmanaged regions. A new configuration parameter rcSegmentSize has been introduced, which is set to 0 to denote unmanaged regions. The logic for reference counting in messages has been updated to accommodate this new parameter, affecting how memory is allocated, copied, and released. The RegionInfo structure and related constructors have been simplified by removing default segment size constants and parameters.

Changes

File Path Change Summary
examples/.../CMakeLists.txt Modified add_example function to include 'region-advanced-external' argument.
examples/.../fairmq-start-ex-region-advanced.sh.in Added --rc-segment-size 0 flag to SAMPLER configuration.
examples/.../keep-alive.cxx Altered ShmManager logic to set cfg.rcSegmentSize to 0 and pass cfg to UnmanagedRegion constructor.
fairmq/shmem/Common.h Removed DefaultRcSegmentSize constant and related constructors from RegionInfo.
fairmq/shmem/Message.h Updated GetRefCount(), Copy(), and Release() methods to handle new rcSegmentSize logic.
fairmq/shmem/UnmanagedRegion.h Added fRcSegmentSize field and adjusted initialization logic for reference counting.
test/message/_message.cxx Updated ZeroCopyFromUnmanaged() to handle new rcSegmentSize parameter and added related test cases.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@rbx rbx merged commit 2df3d90 into FairRootGroup:dev Nov 29, 2023
12 of 13 checks passed
@rbx rbx deleted the shm-ref-count-restore-old branch February 16, 2024 12:18
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

1 participant