1
1

mtl-portals4: Control that flowctl_idx is egal to REQ_FLOWCTL_TABLE_ID

and use OPAL_ATOMIC_CMPSET_32 to test and set flowctl_active flag to true
Этот коммит содержится в:
Pascal Deveze 2016-07-26 08:41:31 +02:00
родитель 9807a6d585
Коммит bd3b1cf7be
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -70,6 +70,13 @@ ompi_mtl_portals4_flowctl_init(void)
goto error;
}
if (ompi_mtl_portals4.flowctl_idx != REQ_FLOWCTL_TABLE_ID) {
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
"%s:%d: PtlPTAlloc did not allocate the requested PT: %d\n",
__FILE__, __LINE__, ompi_mtl_portals4.flowctl_idx);
goto error;
}
ret = PtlCTAlloc(ompi_mtl_portals4.ni_h,
&ompi_mtl_portals4.flowctl.trigger_ct_h);
if (OPAL_UNLIKELY(PTL_OK != ret)) {
@ -291,9 +298,7 @@ ompi_mtl_portals4_flowctl_trigger(void)
{
int ret;
if (false == ompi_mtl_portals4.flowctl.flowctl_active) {
ompi_mtl_portals4.flowctl.flowctl_active = true;
if (true == OPAL_ATOMIC_CMPSET_32(&ompi_mtl_portals4.flowctl.flowctl_active, false, true)) {
/* send trigger to root */
ret = PtlPut(ompi_mtl_portals4.zero_md_h,
0,

Просмотреть файл

@ -34,7 +34,7 @@ OBJ_CLASS_DECLARATION(ompi_mtl_portals4_pending_request_t);
struct ompi_mtl_portals4_flowctl_t {
bool flowctl_active;
int32_t flowctl_active;
int32_t send_slots;
int32_t max_send_slots;