[Pkg-ofed-commits] [libfabric] 79/123: prov/psm: add environment varible to control psm_ep_close timeout
Ana Beatriz Guerrero López
ana at moszumanska.debian.org
Sat Oct 22 12:28:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
ana pushed a commit to annotated tag v1.1.1
in repository libfabric.
commit 24ef92be1b080f9a3bad1744f0a52d56a62fd9f9
Author: Jianxin Xiong <jianxin.xiong at intel.com>
Date: Thu Sep 17 18:24:53 2015 -0700
prov/psm: add environment varible to control psm_ep_close timeout
Gracefully closing PSM endpoints can be slow sometimes. Add a new
environment variable FI_PSM_TIMEOUT to allow applications to
reduce the wait time and proceed to force closing.
Signed-off-by: Jianxin Xiong <jianxin.xiong at intel.com>
---
prov/psm/src/psmx.h | 1 +
prov/psm/src/psmx_domain.c | 4 ++--
prov/psm/src/psmx_init.c | 5 +++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/prov/psm/src/psmx.h b/prov/psm/src/psmx.h
index 7c0a5eb..c49cf81 100644
--- a/prov/psm/src/psmx.h
+++ b/prov/psm/src/psmx.h
@@ -545,6 +545,7 @@ struct psmx_env {
int am_msg;
int tagged_rma;
char *uuid;
+ int timeout;
};
extern struct fi_ops_mr psmx_mr_ops;
diff --git a/prov/psm/src/psmx_domain.c b/prov/psm/src/psmx_domain.c
index 7d832b4..aafdf81 100644
--- a/prov/psm/src/psmx_domain.c
+++ b/prov/psm/src/psmx_domain.c
@@ -60,7 +60,7 @@ static int psmx_domain_close(fid_t fid)
sleep(1);
err = psm_ep_close(domain->psm_ep, PSM_EP_CLOSE_GRACEFUL,
- (int64_t) PSMX_TIME_OUT * 1000000000LL);
+ (int64_t) psmx_env.timeout * 1000000000LL);
if (err != PSM_OK)
psm_ep_close(domain->psm_ep, PSM_EP_CLOSE_FORCE, 0);
@@ -156,7 +156,7 @@ int psmx_domain_open(struct fid_fabric *fabric, struct fi_info *info,
err_out_close_ep:
if (psm_ep_close(domain_priv->psm_ep, PSM_EP_CLOSE_GRACEFUL,
- (int64_t) PSMX_TIME_OUT * 1000000000LL) != PSM_OK)
+ (int64_t) psmx_env.timeout * 1000000000LL) != PSM_OK)
psm_ep_close(domain_priv->psm_ep, PSM_EP_CLOSE_FORCE, 0);
err_out_free_domain:
diff --git a/prov/psm/src/psmx_init.c b/prov/psm/src/psmx_init.c
index 9746040..f8c3c48 100644
--- a/prov/psm/src/psmx_init.c
+++ b/prov/psm/src/psmx_init.c
@@ -42,6 +42,7 @@ struct psmx_env psmx_env = {
.am_msg = 0,
.tagged_rma = 1,
.uuid = PSMX_DEFAULT_UUID,
+ .timeout = PSMX_TIME_OUT,
};
static void psmx_init_env(void)
@@ -53,6 +54,7 @@ static void psmx_init_env(void)
fi_param_get_bool(&psmx_prov, "am_msg", &psmx_env.am_msg);
fi_param_get_bool(&psmx_prov, "tagged_rma", &psmx_env.tagged_rma);
fi_param_get_str(&psmx_prov, "uuid", &psmx_env.uuid);
+ fi_param_get_int(&psmx_prov, "timeout", &psmx_env.timeout);
}
static int psmx_reserve_tag_bits(int *caps, uint64_t *max_tag_value)
@@ -603,6 +605,9 @@ PSM_INI
fi_param_define(&psmx_prov, "uuid", FI_PARAM_STRING,
"Unique Job ID required by the fabric");
+ fi_param_define(&psmx_prov, "timeout", FI_PARAM_INT,
+ "Timeout (seconds) for gracefully closing the PSM endpoint");
+
psm_error_register_handler(NULL, PSM_ERRHANDLER_NO_HANDLER);
major = PSM_VERNO_MAJOR;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libfabric.git
More information about the Pkg-ofed-commits
mailing list