UCT/IB: Skip madvise with DONT_FORK if kernel supports RDMA copy-on-fork#11573
Open
tvegas1 wants to merge 4 commits into
Open
UCT/IB: Skip madvise with DONT_FORK if kernel supports RDMA copy-on-fork#11573tvegas1 wants to merge 4 commits into
tvegas1 wants to merge 4 commits into
Conversation
tvegas1
commented
Jun 24, 2026
| static int uct_ib_fork_init_is_unneeded() | ||
| { | ||
| #if HAVE_DECL_IBV_IS_FORK_INITIALIZED && HAVE_DECL_IBV_FORK_UNNEEDED | ||
| if (ibv_is_fork_initialized() == IBV_FORK_UNNEEDED) { |
Contributor
Author
There was a problem hiding this comment.
guy-ealey-morag
previously approved these changes
Jun 24, 2026
Contributor
Author
|
/azp run UCX PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tomerg-nvidia
previously approved these changes
Jun 25, 2026
brminich
reviewed
Jun 25, 2026
| } | ||
| } | ||
|
|
||
| static int uct_ib_is_fork_init_unneeded() |
Contributor
There was a problem hiding this comment.
maybe uct_ib_is_fork_unneeded()
i'd even call it uct_ib_is_fork_needed() but it will not be consistent with verbs
Contributor
Author
There was a problem hiding this comment.
@tvegas1: uct_ib_fork_init_is_unneeded
@guy-ealey-morag request: uct_ib_is_fork_init_unneeded
@brminich request: uct_ib_is_fork_unneeded / uct_ib_is_fork_needed
are we all ok with uct_ib_is_fork_init_needed? i think it is ibv_fork_init call that is either needed or not.
35f2287
guy-ealey-morag
approved these changes
Jun 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Detect
IBV_FORK_UNNEEDEDin the IB fork-init path and skip UCX-side fork initialization handling in that case.Why
When the kernel supports RDMA copy-on-fork, libibverbs does not need
MADV_DONTFORKtracking. That old path can split VMAs on every registration and hitvm.max_map_count, causingmadvise()to fail withENOMEMeven when physical memory is available.How
Add configure checks for
IBV_FORK_UNNEEDEDandibv_is_fork_initialized(). Inuct_ib_fork_init(), return success withfork_initunset when libibverbs reports fork handling is unneeded.