oshmem: mem use hook: apply code review fixes
Signed-off-by: Alex Mikheev <alexm@mellanox.com> (cherry picked from commit a422154a141f0be5b92d2b6c26d7b2b4176dfe18)
Этот коммит содержится в:
родитель
9da9e6260d
Коммит
ea3ea4835b
@ -469,7 +469,7 @@ static int _do_alloc(uint32_t order,
|
||||
}
|
||||
|
||||
*p_buff = (void*) addr;
|
||||
MCA_SPML_CALL(memuse_hook(addr, 1<<order));
|
||||
MCA_SPML_CALL(memuse_hook(*p_buff, 1ULL<<order));
|
||||
return OSHMEM_SUCCESS;
|
||||
|
||||
alloc_error: _buddy_free(&memheap_buddy, offset, order, heap);
|
||||
|
@ -289,7 +289,7 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
|
||||
&ep_params,
|
||||
&mca_spml_ucx.ucp_peers[i].ucp_conn);
|
||||
if (UCS_OK != err) {
|
||||
SPML_ERROR("ucp_ep_create failed: %s\n", ucs_status_string(err));
|
||||
SPML_ERROR("ucp_ep_create failed: %s", ucs_status_string(err));
|
||||
goto error2;
|
||||
}
|
||||
OSHMEM_PROC_DATA(procs[i])->num_transports = 1;
|
||||
@ -387,7 +387,7 @@ error_fatal:
|
||||
|
||||
void mca_spml_ucx_memuse_hook(void *addr, size_t length)
|
||||
{
|
||||
int my_pe = oshmem_my_proc_id();
|
||||
int my_pe;
|
||||
spml_ucx_mkey_t *ucx_mkey;
|
||||
ucp_mem_advise_params_t params;
|
||||
ucs_status_t status;
|
||||
@ -396,6 +396,7 @@ void mca_spml_ucx_memuse_hook(void *addr, size_t length)
|
||||
return;
|
||||
}
|
||||
|
||||
my_pe = oshmem_my_proc_id();
|
||||
ucx_mkey = &mca_spml_ucx.ucp_peers[my_pe].mkeys[HEAP_SEG_INDEX].key;
|
||||
|
||||
params.field_mask = UCP_MEM_ADVISE_PARAM_FIELD_ADDRESS |
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user