diff --git a/oshmem/mca/memheap/buddy/memheap_buddy.c b/oshmem/mca/memheap/buddy/memheap_buddy.c index c7715f4dd1..b3f4ca1df9 100644 --- a/oshmem/mca/memheap/buddy/memheap_buddy.c +++ b/oshmem/mca/memheap/buddy/memheap_buddy.c @@ -469,7 +469,7 @@ static int _do_alloc(uint32_t order, } *p_buff = (void*) addr; - /* no barrier because it is not required by spec! */ + MCA_SPML_CALL(memuse_hook(addr, 1<mem_h, ¶ms); + if (UCS_OK != status) { + SPML_ERROR("ucp_mem_advise failed addr %p len %llu", + addr, (unsigned long long)length); + } +} + sshmem_mkey_t *mca_spml_ucx_register(void* addr, size_t size, uint64_t shmid, diff --git a/oshmem/mca/spml/ucx/spml_ucx.h b/oshmem/mca/spml/ucx/spml_ucx.h index 4b248e026a..b524031d3f 100644 --- a/oshmem/mca/spml/ucx/spml_ucx.h +++ b/oshmem/mca/spml/ucx/spml_ucx.h @@ -108,6 +108,8 @@ extern sshmem_mkey_t *mca_spml_ucx_register(void* addr, int *count); extern int mca_spml_ucx_deregister(sshmem_mkey_t *mkeys); +extern void mca_spml_ucx_memuse_hook(void *addr, size_t length); + extern void mca_spml_ucx_rmkey_unpack(sshmem_mkey_t *mkey, uint32_t segno, int pe, int tr_id); extern void mca_spml_ucx_rmkey_free(sshmem_mkey_t *mkey); diff --git a/oshmem/mca/spml/yoda/spml_yoda.c b/oshmem/mca/spml/yoda/spml_yoda.c index 8e87c58df7..ebdceab8c9 100644 --- a/oshmem/mca/spml/yoda/spml_yoda.c +++ b/oshmem/mca/spml/yoda/spml_yoda.c @@ -65,6 +65,7 @@ mca_spml_yoda_module_t mca_spml_yoda = { mca_spml_yoda_fence, mca_spml_base_rmkey_unpack, mca_spml_base_rmkey_free, + mca_spml_base_memuse_hook, (void *)&mca_spml_yoda }