Skip to content

Commit d11ccba

Browse files
committed
OSC RDMA: put memory of each process into separate pages
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 9203156 commit d11ccba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "opal/util/argv.h"
4848
#include "opal/util/printf.h"
4949
#include "opal/align.h"
50+
#include "opal/util/sys_limits.h"
5051
#if OPAL_CUDA_SUPPORT
5152
#include "opal/datatype/opal_datatype_cuda.h"
5253
#endif /* OPAL_CUDA_SUPPORT */
@@ -550,6 +551,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
550551
ompi_osc_rdma_region_t *state_region;
551552
struct _local_data *temp;
552553
char *data_file;
554+
int page_size = opal_getpagesize();
553555

554556
shared_comm = module->shared_comm;
555557

@@ -575,9 +577,9 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
575577
data_base = state_base + leader_peer_data_size + module->state_size * local_size;
576578

577579
/* ensure proper alignment */
578-
data_base += OPAL_ALIGN_PAD_AMOUNT(data_base, OPAL_ALIGN_MIN);
579580
if (MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
580-
size += OPAL_ALIGN_PAD_AMOUNT(size, OPAL_ALIGN_MIN);
581+
data_base += OPAL_ALIGN_PAD_AMOUNT(data_base, page_size);
582+
size += OPAL_ALIGN_PAD_AMOUNT(size, page_size);
581583
}
582584

583585
do {

0 commit comments

Comments
 (0)