Skip to content

Conversation

@alex-mikheev
Copy link
Contributor

@yosefe @miked-mellanox @jladd-mlnx
please take a look

The hook is called from memheap when memory range
is going to be allocated by smalloc(), realloc() and others.

ucx spml uses this hook to call ucp_mem_advise in order to speedup
non blocking memory mapping.

Signed-off-by: Alex Mikheev <alexm@mellanox.com>
(cherry picked from commit 986ca00)
Signed-off-by: Alex Mikheev <alexm@mellanox.com>
(cherry picked from commit 9da9e62)
&mca_spml_ucx.ucp_peers[i].ucp_conn);
if (UCS_OK != err) {
SPML_ERROR("ucp_ep_create failed!!!\n");
SPML_ERROR("ucp_ep_create failed: %s\n", ucs_status_string(err));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remote the \n

err = ucp_worker_flush(mca_spml_ucx.ucp_worker);
if (UCS_OK != err) {
SPML_ERROR("fence failed");
SPML_ERROR("fence failed: %s", ucs_status_string(err));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

err = ucp_worker_flush(mca_spml_ucx.ucp_worker);
if (UCS_OK != err) {
SPML_ERROR("fence failed");
SPML_ERROR("fence failed: %s", ucs_status_string(err));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation


*p_buff = (void*) addr;
/* no barrier because it is not required by spec! */
MCA_SPML_CALL(memuse_hook(addr, 1<<order));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1LL<<order
2nd param is size_t or cast order to (size_t)


void mca_spml_ucx_memuse_hook(void *addr, size_t length)
{
int my_pe = oshmem_my_proc_id();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz split into var and assignment

@alex-mikheev
Copy link
Contributor Author

@yosefe @miked-mellanox can you rollback the merge of original comits to master ? I would rather fix it there and than cherry pick again


status = ucp_mem_advise(mca_spml_ucx.ucp_context, ucx_mkey->mem_h, &params);
if (UCS_OK != status) {
SPML_ERROR("ucp_mem_advise failed addr %p len %llu",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe warn? as it is not destructive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no option for warning. It is either verbose or error.

@yosefe
Copy link
Contributor

yosefe commented Jan 29, 2017

@alex-mikheev i think it would be easier to submit a fix commit both to master and to this PR

Signed-off-by: Alex Mikheev <alexm@mellanox.com>
@mike-dubman
Copy link
Member

@alex-mikheev - please PR it into v2.x and v2.0

@hppritcha
Copy link
Member

bot:lanl:retest

@jladd-mlnx
Copy link
Member

@hppritcha Please merge this ASAP. The LANL failure looks unrelated to this commit.

@hppritcha
Copy link
Member

bot:lanl:retest

@hppritcha hppritcha merged commit 8b16747 into open-mpi:v2.x Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants