-
Notifications
You must be signed in to change notification settings - Fork 1
POSIX Shared Memory implementation #115
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements POSIX shared memory for inter-process communication (IPC) to enable faster message passing between processes on the same physical node. The implementation supports both standard POSIX shared memory and XPMEM when available, with configuration options to control pool sizes and message cutoffs.
- Adds POSIX shared memory IPC infrastructure with fallback to XPMEM
- Integrates IPC block processing into the scheduler loop
- Updates assertion and error handling macros for better debugging
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
File | Description |
---|---|
src/threads.cpp | Adds CthIsSuspendable function to check thread suspend capability |
src/scheduler.cpp | Integrates IPC block processing into main scheduler loop |
src/converse_config.h.in | Adds CMK_USE_SHMEM configuration option |
src/convcore.cpp | Adds IPC manager initialization and memory management integration |
src/conv-topology.cpp | Removes deprecated communication thread synchronization code |
src/cmixpmem.cpp | Implements XPMEM-based shared memory for high-performance IPC |
src/cmishmem.cpp | Main IPC implementation with block allocation and message handling |
src/cmishm.cpp | POSIX shared memory implementation with process coordination |
src/cmi-shmem-common.h | Common definitions and utilities for shared memory IPC |
src/cldb.rand.cpp | Fixes handler index access to use proper CpvAccess macro |
src/cldb.h | Changes CldHandlerIndex from thread_local to CpvExtern |
src/cldb.cpp | Updates CldHandlerIndex declaration |
src/CMakeLists.txt | Adds cmishmem.cpp to build sources |
include/converse.h | Adds IPC API declarations and improved assertion macros |
CMakeLists.txt | Adds CMK_USE_SHMEM build option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Could you fix or dismiss the copilot comments? |
Resolved all the comments |
int CthIsSuspendable(CthThread t) { return B(t)->suspendable; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this logic is no longer used?
int CthIsSuspendable(CthThread t) { return B(t)->suspendable; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in charm's init.C. I also think it's good to support this generally in our threads library
auto* manager = CsvAccess(coreIpcManager_); | ||
if (msg && (ipc = CmiIsIpcBlock(manager, BLKSTART(msg), CmiMyNode()))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
who's creating the manager here? i don't see a call to CmiMakeIpcManager
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initialization happens in Charm++ (init.C:1713)
Co-authored-by: Justin Szaday <wingpad@gmail.com>
Implements inter-process communication (IPC) with the use of POSIX shared memory and XPMEM (when available). It is not enabled by default, and you have to provide a build command to enable it.