Skip to content
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

prov/efa: Move fork handler installation to efa_domain_open #10667

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions prov/efa/src/efa_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ int efa_domain_open(struct fid_fabric *fabric_fid, struct fi_info *info,
efa_domain->util_domain.domain_fid.ops = &efa_ops_domain_dgram;
}

#ifndef _WIN32
err = efa_fork_support_install_fork_handler();
if (err) {
EFA_WARN(FI_LOG_CORE,
"Unable to install fork handler: %s\n",
strerror(-err));
return err;
}
#endif

dlist_insert_tail(&efa_domain->list_entry, &g_efa_domain_list);
return 0;

Expand Down
18 changes: 0 additions & 18 deletions prov/efa/src/efa_user_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,24 +610,6 @@ int efa_getinfo(uint32_t version, const char *node,
struct fi_info *dgram_info_list, *rdm_info_list;
int err;

#ifndef _WIN32
/*
* TODO:
* It'd be better to install this during provider init (since that's
* only invoked once) but fork() is currently called by nvml_init in
* other provider's ini (which calls ofi_hmem_init) after efa provider init.
* This can move to the provider init after we get rid of that fork() in
* ofi_hmem_init().
*/
err = efa_fork_support_install_fork_handler();
if (err) {
EFA_WARN(FI_LOG_CORE,
"Unable to install fork handler: %s\n",
strerror(-err));
return err;
}
#endif

if (hints && hints->ep_attr && hints->ep_attr->type == FI_EP_DGRAM)
return efa_user_info_get_dgram(version, node, service, flags, hints, info);

Expand Down
Loading