/dev/shm: use Linux PFNs and populate mappings

Change-Id: I921c1f43c8411f896343be17e0ac6762a1bc26d1
This commit is contained in:
Balazs Gerofi
2019-09-26 13:05:16 +09:00
committed by Masamichi Takagi
parent 5c2f9b8239
commit f8e8b21f04
2 changed files with 35 additions and 6 deletions

View File

@ -1812,6 +1812,7 @@ do_mmap(const uintptr_t addr0, const size_t len0, const int prot,
__func__, flags, memobj->path, memobj->flags, pgshift, p2align);
pgshift = PAGE_SHIFT;
p2align = PAGE_P2ALIGN;
populated_mapping = 1;
}
#ifdef ATTACHED_MIC
/*
@ -1849,6 +1850,13 @@ do_mmap(const uintptr_t addr0, const size_t len0, const int prot,
#ifdef PROFILE_ENABLE
profile_event_add(PROFILE_mmap_device_file, len);
#endif // PROFILE_ENABLE
if (memobj->path &&
(!strncmp("/tmp/ompi.", memobj->path, 10) ||
!strncmp("/dev/shm/", memobj->path, 9))) {
pgshift = PAGE_SHIFT;
p2align = PAGE_P2ALIGN;
populated_mapping = 1;
}
}
}
if (error) {