Skip to content

prov/efa: Evaluate p2p support lazily#12311

Open
mthyoung-amzn wants to merge 2 commits into
ofiwg:mainfrom
mthyoung-amzn:lazy-p2p-check-2
Open

prov/efa: Evaluate p2p support lazily#12311
mthyoung-amzn wants to merge 2 commits into
ofiwg:mainfrom
mthyoung-amzn:lazy-p2p-check-2

Conversation

@mthyoung-amzn
Copy link
Copy Markdown
Contributor

No description provided.

@mthyoung-amzn mthyoung-amzn changed the title Lazy p2p check 2 prov/efa: Evaluate p2p support lazily May 29, 2026
We will be removing the eager check for p2p support to run on lazily on
the first attempt to register device memory. We still only want to run
the check once, so need to indicate whether we have yet probed for
support. This just defines the enum and code that looked at
p2p_supported_by_device, no actual change in behavior.

Signed-off-by: Mitchell Young <mthyoung@amazon.com>
Determination of support for P2P registration of device memory with the
NIC was being done eagerly in the EFA_INI path, which is expensive and
disruptive. This moves the check for P2P support later, on the first
attempt to register a device buffer with ibv. If this fails, we latch
support for p2p to UNSUPPORTED and fall through to the fallback
mechanism that uses bounce buffer. Future attempts to register a device
buffer will go directly to the fallback mechanism.

Signed-off-by: Mitchell Young <mthyoung@amazon.com>
@mthyoung-amzn mthyoung-amzn marked this pull request as ready for review May 29, 2026 23:06
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