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

Fix reference count region initialization #492

Merged
merged 4 commits into from
Nov 24, 2023
Merged

Conversation

rbx
Copy link
Member

@rbx rbx commented Nov 24, 2023

Fix a bug where the externally created region's rc segment settings would be ignored by the region user. The changes make sure that the registered size value is honored in case:

  • region user creates it itself.
  • region config is created externally (region user accepts external config value).
  • region undergoes soft reset and is recreated by the region user (in this case the configured value still must be honored).

Other additions:

  • Monitor output for the reference count segment to include the amount of free space in the segment.
  • example script for usage with externally created regions.

Copy link

coderabbitai bot commented Nov 24, 2023

Walkthrough

Walkthrough

The changes across various scripts and source files are primarily focused on configuration and initialization improvements in a messaging system setup. Bash scripts have been updated to handle environment variables, command-line arguments, and default values more efficiently. CMake configuration now uses the @ONLY option to prevent variable expansion. In the C++ source files, there have been adjustments to the shared memory management, including the removal of redundant variables and the addition of initialization steps for reference counting segments.

Changes

File Summary
examples/.../fairmq-start-ex-region-advanced-external.sh.in Updated to set FAIRMQ_PATH, adjust transport type and message size based on user input, and configure processes with specific shared memory and channel parameters.
examples/.../fairmq-start-ex-region-advanced.sh.in Changed to assign msgSize using the second input parameter and simplified by using default value assignments for transport and msgSize.
examples/.../fairmq-start-ex-region.sh.in Modified to assign msgSize using the second input parameter and introduced parameter expansion for default values.
examples/CMakeLists.txt Added @ONLY option to configure_file function calls to prevent CMake variable processing.
fairmq/shmem/Manager.h Removed rcSegmentSize variable, added checks and settings for rcSegmentSize in cfg based on shared memory regions.
fairmq/shmem/Monitor.cxx Enhanced Monitor::PrintShm function to include free memory output of rcCountSegment.
fairmq/shmem/UnmanagedRegion.h Added InitializeRefCountSegment call after zeroing free memory in the initialization process.

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

fairmq/shmem/Manager.h Show resolved Hide resolved
fairmq/shmem/Manager.h Show resolved Hide resolved
fairmq/shmem/Manager.h Show resolved Hide resolved
fairmq/shmem/Manager.h Show resolved Hide resolved
fairmq/shmem/Manager.h Show resolved Hide resolved
@rbx rbx merged commit addfd07 into FairRootGroup:dev Nov 24, 2023
12 of 13 checks passed
@rbx rbx deleted the rc-region-init 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

2 participants