opal/common/ucx: use trylock in opal_common_progress
Signed-off-by: Xin Zhao <xinz@mellanox.com>
Этот коммит содержится в:
родитель
2d3cffe1a3
Коммит
1fa7054041
@ -290,7 +290,7 @@ opal_common_ucx_wpool_progress(opal_common_ucx_wpool_t *wpool)
|
|||||||
/* Go over all active workers and progress them
|
/* Go over all active workers and progress them
|
||||||
* TODO: may want to have some partitioning to progress only part of
|
* TODO: may want to have some partitioning to progress only part of
|
||||||
* workers */
|
* workers */
|
||||||
opal_mutex_lock(&wpool->mutex);
|
if (!opal_mutex_trylock (&wpool->mutex)) {
|
||||||
OPAL_LIST_FOREACH_SAFE(item, next, &wpool->active_workers,
|
OPAL_LIST_FOREACH_SAFE(item, next, &wpool->active_workers,
|
||||||
_winfo_list_item_t) {
|
_winfo_list_item_t) {
|
||||||
opal_common_ucx_winfo_t *winfo = item->ptr;
|
opal_common_ucx_winfo_t *winfo = item->ptr;
|
||||||
@ -306,9 +306,9 @@ opal_common_ucx_wpool_progress(opal_common_ucx_wpool_t *wpool)
|
|||||||
}
|
}
|
||||||
opal_mutex_unlock(&winfo->mutex);
|
opal_mutex_unlock(&winfo->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
opal_mutex_unlock(&wpool->mutex);
|
opal_mutex_unlock(&wpool->mutex);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_wpool_list_put(opal_common_ucx_wpool_t *wpool, opal_list_t *list,
|
_wpool_list_put(opal_common_ucx_wpool_t *wpool, opal_list_t *list,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user