Skip to content

Commit 84dfe12

Browse files
committed
opal/common/ucx: Rename wpool recv_worker to dflt_worker
Signed-off-by: Artem Polyakov <artpol84@gmail.com>
1 parent 8a990c2 commit 84dfe12

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

opal/mca/common/ucx/common_ucx_wpool.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ opal_common_ucx_wpool_init(opal_common_ucx_wpool_t *wpool,
186186
rc = OPAL_ERROR;
187187
goto err_worker_create;
188188
}
189-
wpool->recv_worker = winfo->worker;
189+
wpool->dflt_worker = winfo->worker;
190190

191-
status = ucp_worker_get_address(wpool->recv_worker,
191+
status = ucp_worker_get_address(wpool->dflt_worker,
192192
&wpool->recv_waddr, &wpool->recv_waddr_len);
193193
if (status != UCS_OK) {
194194
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,
208208
err_wpool_add:
209209
free(wpool->recv_waddr);
210210
err_get_addr:
211-
if (NULL != wpool->recv_worker) {
212-
ucp_worker_destroy(wpool->recv_worker);
211+
if (NULL != wpool->dflt_worker) {
212+
ucp_worker_destroy(wpool->dflt_worker);
213213
}
214214
err_worker_create:
215215
ucp_cleanup(wpool->ucp_ctx);
@@ -241,7 +241,7 @@ void opal_common_ucx_wpool_finalize(opal_common_ucx_wpool_t *wpool)
241241

242242
/* Release the address here. recv worker will be released
243243
* below along with other idle workers */
244-
ucp_worker_release_address(wpool->recv_worker, wpool->recv_waddr);
244+
ucp_worker_release_address(wpool->dflt_worker, wpool->recv_waddr);
245245

246246
/* Go over the list, free idle list items */
247247
if (!opal_list_is_empty(&wpool->idle_workers)) {

opal/mca/common/ucx/common_ucx_wpool.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef struct {
3131

3232
/* UCX data */
3333
ucp_context_h ucp_ctx;
34-
ucp_worker_h recv_worker;
34+
ucp_worker_h dflt_worker;
3535
ucp_address_t *recv_waddr;
3636
size_t recv_waddr_len;
3737

@@ -76,7 +76,9 @@ typedef struct {
7676
/* Worker Pool memory (wpmem) is an object that represents a remotely accessible
7777
* distributed memory.
7878
* It has dynamic lifetime (created and destroyed by corresponding functions).
79-
* It depends on particular Wpool context
79+
* It depends on particular Wpool context.
80+
* Currently OSC is using one context per MPI Window, though in future it will
81+
* be possible to have one context for multiple windows.
8082
*/
8183
typedef struct {
8284
/* reference context to which memory region belongs */
@@ -100,7 +102,8 @@ typedef struct {
100102
/* The structure that wraps UCP worker and holds the state that is required
101103
* for its use.
102104
* The structure is allocated along with UCP worker on demand and is being held
103-
* in the Worker Pool lists (either active or idle)
105+
* in the Worker Pool lists (either active or idle).
106+
* One wpmem is intended per shared memory segment (i.e. MPI Window).
104107
*/
105108
typedef struct opal_common_ucx_winfo {
106109
opal_recursive_mutex_t mutex;

0 commit comments

Comments
 (0)