-
Notifications
You must be signed in to change notification settings - Fork 7
Using ibv_exp_reg_mr instead of ibv_reg_mr #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
cc4bf62
8cccb9a
57fb8bf
ea34f23
e08034b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,11 +246,11 @@ int comm_init(MPI_Comm comm, int gpuId) | |
| iomb(); | ||
|
|
||
| DBG("registering ready_table size=%zd\n", table_size); | ||
| MP_CHECK(mp_register(ready_table, table_size, &ready_table_reg)); | ||
| MP_CHECK(mp_register(ready_table, table_size, &ready_table_reg, 0)); | ||
| DBG("creating ready_table window\n"); | ||
| MP_CHECK(mp_window_create(ready_table, table_size, &ready_table_win)); | ||
| DBG("registering remote_ready_table\n"); | ||
| MP_CHECK(mp_register(remote_ready_values, table_size, &remote_ready_values_reg)); | ||
| MP_CHECK(mp_register(remote_ready_values, table_size, &remote_ready_values_reg, 0)); | ||
|
|
||
| comm_initialized = 1; | ||
|
|
||
|
|
@@ -706,7 +706,24 @@ int comm_register(void *buf, size_t size, comm_reg_t *creg) | |
|
|
||
| if (!*reg) { | ||
| DBG("registering buffer %p\n", buf); | ||
| MP_CHECK(mp_register(buf, size, reg)); | ||
| MP_CHECK(mp_register(buf, size, reg, 0)); | ||
| } | ||
|
|
||
| out: | ||
| return ret; | ||
| } | ||
|
|
||
| int comm_register_odp(comm_reg_t *creg) | ||
| { | ||
| assert(comm_initialized); | ||
| int ret = 0; | ||
| int retcode; | ||
| mp_reg_t *reg = (mp_reg_t*)creg; | ||
| assert(reg); | ||
|
|
||
| if (!*reg) { | ||
| DBG("registering implicit ODP MR\n"); | ||
| MP_CHECK(mp_register(NULL, 0, reg, IBV_EXP_ACCESS_ON_DEMAND)); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentations says:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that the size parameter is ignored by mp_register() when ODP is enabled. So technically this code is correct
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder what happens if the app calls comm_register_odp() multiple times. Does ibv_reg_mr() succeed? Does it return the same mr / lkey ? |
||
| } | ||
|
|
||
| out: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this API is not expressive enough.
You are effectively exposing all/most of the local process memory.
Explicit/implicit ODP support has limitations, see https://community.mellanox.com/docs/DOC-2898, e.g. have to check for capability.