Skip to content

Commit

Permalink
OSHMEM: sshmem mmap: use MAP_PRIVATE instead of MAP_SHARED
Browse files Browse the repository at this point in the history
It looks like using MAP_PRIVATE instead of MAP_SHARED greatly
speeds up infiniband memory registration.

Change-Id: Id7089f58458ef8fff4034a2c4707d31f7e8b6694
(cherry picked from commit 89535a3)
  • Loading branch information
alex-mikheev authored and mike-dubman committed Oct 6, 2014
1 parent cfc2d64 commit 90a2e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oshmem/mca/sshmem/mmap/sshmem_mmap_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ segment_create(map_segment_t *ds_buf,
addr = mmap((void *)mca_sshmem_base_start_address,
size,
PROT_READ | PROT_WRITE,
MAP_SHARED |
MAP_PRIVATE |
#if defined(MAP_ANONYMOUS)
MAP_ANONYMOUS |
#endif
Expand Down

0 comments on commit 90a2e91

Please sign in to comment.