Skip to content

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

Merged
rbx merged 3 commits into
FairRootGroup:devfrom
rbx:shm-ref-count-restore-old
Nov 29, 2023
Merged

Shm UR ref count segment: fallback to old behaviour when segment size is set to 0#493
rbx merged 3 commits into
FairRootGroup:devfrom
rbx:shm-ref-count-restore-old

Conversation

@rbx

@rbx rbx commented Nov 29, 2023

Copy link
Copy Markdown
Member

Describe your proposal.

Mention any issue this PR resolves or is related to.


Checklist:

@coderabbitai

coderabbitai Bot commented Nov 29, 2023

Copy link
Copy Markdown
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

Comment thread examples/region/keep-alive.cxx
@rbx rbx merged commit 2df3d90 into FairRootGroup:dev Nov 29, 2023
@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.

1 participant