-
Notifications
You must be signed in to change notification settings - Fork 10
Optimizes the Margo DTL's memory usage by matching the behavior of the UCX DTL #178
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
Open
ilumsden
wants to merge
6
commits into
flux-framework:main
Choose a base branch
from
TauferLab:margo_memory_optimization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d0cbbc0
Update Margo DTL to avoid memory leaks and massive performance limita…
ilumsden 8b50a60
Add a pointer check around flux_msg_handler_delvec to avoid potential…
ilumsden e737b89
Eliminate a redundant goto/jump
ilumsden 2c70594
Make the max transfer size for the DTL backends configurable at build…
ilumsden c27ed68
Fix a couple of minor syntax mistakes
ilumsden b75acd5
Fix small bug where there was a missing variable declaration
ilumsden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,12 +12,12 @@ set(FLUX_PRIVATE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/flux_dtl.h) | |
| set(FLUX_PUBLIC_HEADERS) | ||
|
|
||
| # UCX implementation for DTL | ||
| set(UCX_DTL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/ucx_dtl.c ${CMAKE_CURRENT_SOURCE_DIR}/ucx_ep_cache.cpp) | ||
| set(UCX_DTL_SRC ${CMAKE_CURRENT_BINARY_DIR}/ucx_dtl.c ${CMAKE_CURRENT_SOURCE_DIR}/ucx_ep_cache.cpp) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of doing this, MAX_TRANSFER_SIZE as an env variable. |
||
| set(UCX_PRIVATE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/ucx_dtl.h ${CMAKE_CURRENT_SOURCE_DIR}/ucx_ep_cache.h) | ||
| set(UCX_PUBLIC_HEADERS) | ||
|
|
||
| # Margo implementation for DTL | ||
| set(MARGO_DTL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/margo_dtl.c) | ||
| set(MARGO_DTL_SRC ${CMAKE_CURRENT_BINARY_DIR}/margo_dtl.c) | ||
| set(MARGO_PRIVATE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/margo_dtl.h) | ||
| set(MARGO_PUBLIC_HEADERS) | ||
|
|
||
|
|
@@ -28,13 +28,25 @@ list(APPEND DTL_PUBLIC_HEADERS ${FLUX_PUBLIC_HEADERS}) | |
|
|
||
| # UCX: compile-time selection | ||
| if(DYAD_ENABLE_UCX_DTL) | ||
| # Use configure_file to set UCX_MAX_TRANSFER_SIZE | ||
| configure_file( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/ucx_dtl.c | ||
| ${CMAKE_CURRENT_BINARY_DIR}/ucx_dtl.c | ||
| @ONLY | ||
| ) | ||
| list(APPEND DTL_SRC ${UCX_DTL_SRC}) | ||
| list(APPEND DTL_PRIVATE_HEADERS ${UCX_PRIVATE_HEADERS}) | ||
| list(APPEND DTL_PUBLIC_HEADERS ${UCX_PUBLIC_HEADERS}) | ||
| endif() | ||
|
|
||
| # Margo: compile-time selection | ||
| if(DYAD_ENABLE_MARGO_DTL) | ||
| # Use configure_file to set MARGO_MAX_TRANSFER_SIZE | ||
| configure_file( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/margo_dtl.c | ||
| ${CMAKE_CURRENT_BINARY_DIR}/margo_dtl.c | ||
| @ONLY | ||
| ) | ||
| list(APPEND DTL_SRC ${MARGO_DTL_SRC}) | ||
| list(APPEND DTL_PRIVATE_HEADERS ${MARGO_PRIVATE_HEADERS}) | ||
| list(APPEND DTL_PUBLIC_HEADERS ${MARGO_PUBLIC_HEADERS}) | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We want this be rather runtime configurable.
CMake can set the deafult value.
DYAD_DTL_MAX_TX_SIZE_DEFAULT, which should be written to dyad_config.h
This should be commonly used for both UCX and MARGO, client and server.
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.
This one is from shuffle test.
bool parse_size (const char* str, size_t& out)
{
char* end;
long long val = strtoll (str, &end, 10);
if (val <= 0 || end == str)
return false;
}