Skip to content

prov/efa: Make sure resources are freed before destroying domain - #13010

Open
mthyoung-amzn wants to merge 1 commit into
ofiwg:mainfrom
mthyoung-amzn:fi_close_domain_check_empty
Open

mthyoung-amzn wants to merge 1 commit into
ofiwg:mainfrom
mthyoung-amzn:fi_close_domain_check_empty

Conversation

@mthyoung-amzn

@mthyoung-amzn mthyoung-amzn commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

We were not tracking MRs along other domain resources, and were not
checking that they were freed before cleaning up domains in fi_close().

This adds reference tracking of MRs (properly accounting for the
internally-allocated zero-byte bounce buffer), and adds a precondition
check that all application-allocated references have been freed. If not,
return early with -FI_EBUSY, per the spec.

yinliaws
yinliaws previously approved these changes Oct 14, 2026
@shijin-aws

Copy link
Copy Markdown
Contributor

why not just return EBUSY when the domain's refcnt is nonzero?

@mthyoung-amzn
mthyoung-amzn force-pushed the fi_close_domain_check_empty branch 2 times, most recently from 94308c3 to 61faa36 Compare October 14, 2026 23:41
@mthyoung-amzn mthyoung-amzn changed the title prov/efa: Make sure mr bufpool is empty before destroying prov/efa: Make sure resources are freed before destroying domain Oct 14, 2026
We were not tracking MRs along other domain resources, and were not
checking that they were freed before cleaning up domains in fi_close().

This adds reference tracking of MRs (properly accounting for the
internally-allocated zero-byte bounce buffer), and adds a precondition
check that all application-allocated references have been freed. If not,
return early with -FI_EBUSY, per the spec.

Signed-off-by: Mitchell Young <mthyoung@amazon.com>
@mthyoung-amzn
mthyoung-amzn force-pushed the fi_close_domain_check_empty branch from 61faa36 to a8201af Compare October 14, 2026 23:45

This branch has not been deployed

No deployments
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.

3 participants