From 84dfe1277c05c46b43a03e4ae613feec19046ec2 Mon Sep 17 00:00:00 2001 From: Artem Polyakov Date: Sun, 6 Jan 2019 05:27:43 -0800 Subject: [PATCH] opal/common/ucx: Rename wpool recv_worker to dflt_worker Signed-off-by: Artem Polyakov --- opal/mca/common/ucx/common_ucx_wpool.c | 10 +++++----- opal/mca/common/ucx/common_ucx_wpool.h | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/opal/mca/common/ucx/common_ucx_wpool.c b/opal/mca/common/ucx/common_ucx_wpool.c index 47c81e053f..5f85fd5691 100644 --- a/opal/mca/common/ucx/common_ucx_wpool.c +++ b/opal/mca/common/ucx/common_ucx_wpool.c @@ -186,9 +186,9 @@ opal_common_ucx_wpool_init(opal_common_ucx_wpool_t *wpool, rc = OPAL_ERROR; goto err_worker_create; } - wpool->recv_worker = winfo->worker; + wpool->dflt_worker = winfo->worker; - status = ucp_worker_get_address(wpool->recv_worker, + status = ucp_worker_get_address(wpool->dflt_worker, &wpool->recv_waddr, &wpool->recv_waddr_len); if (status != UCS_OK) { MCA_COMMON_UCX_VERBOSE(1, "ucp_worker_get_address failed: %d", status); @@ -208,8 +208,8 @@ opal_common_ucx_wpool_init(opal_common_ucx_wpool_t *wpool, err_wpool_add: free(wpool->recv_waddr); err_get_addr: - if (NULL != wpool->recv_worker) { - ucp_worker_destroy(wpool->recv_worker); + if (NULL != wpool->dflt_worker) { + ucp_worker_destroy(wpool->dflt_worker); } err_worker_create: ucp_cleanup(wpool->ucp_ctx); @@ -241,7 +241,7 @@ void opal_common_ucx_wpool_finalize(opal_common_ucx_wpool_t *wpool) /* Release the address here. recv worker will be released * below along with other idle workers */ - ucp_worker_release_address(wpool->recv_worker, wpool->recv_waddr); + ucp_worker_release_address(wpool->dflt_worker, wpool->recv_waddr); /* Go over the list, free idle list items */ if (!opal_list_is_empty(&wpool->idle_workers)) { diff --git a/opal/mca/common/ucx/common_ucx_wpool.h b/opal/mca/common/ucx/common_ucx_wpool.h index 3739a0773c..0c3cb3bd0b 100644 --- a/opal/mca/common/ucx/common_ucx_wpool.h +++ b/opal/mca/common/ucx/common_ucx_wpool.h @@ -31,7 +31,7 @@ typedef struct { /* UCX data */ ucp_context_h ucp_ctx; - ucp_worker_h recv_worker; + ucp_worker_h dflt_worker; ucp_address_t *recv_waddr; size_t recv_waddr_len; @@ -76,7 +76,9 @@ typedef struct { /* Worker Pool memory (wpmem) is an object that represents a remotely accessible * distributed memory. * It has dynamic lifetime (created and destroyed by corresponding functions). - * It depends on particular Wpool context + * It depends on particular Wpool context. + * Currently OSC is using one context per MPI Window, though in future it will + * be possible to have one context for multiple windows. */ typedef struct { /* reference context to which memory region belongs */ @@ -100,7 +102,8 @@ typedef struct { /* The structure that wraps UCP worker and holds the state that is required * for its use. * The structure is allocated along with UCP worker on demand and is being held - * in the Worker Pool lists (either active or idle) + * in the Worker Pool lists (either active or idle). + * One wpmem is intended per shared memory segment (i.e. MPI Window). */ typedef struct opal_common_ucx_winfo { opal_recursive_mutex_t mutex;