pager: prefetch all shared libraries

Change-Id: Ic62e1284d540362df817098b3926ac223245e3b6
This commit is contained in:
Balazs Gerofi
2019-09-26 12:28:11 +09:00
committed by Masamichi Takagi
parent 1afc3d9b70
commit 5c2f9b8239

View File

@ -1050,7 +1050,7 @@ static int pager_req_create(ihk_os_t os, int fd, uintptr_t result_pa)
pager = newpager; pager = newpager;
newpager = NULL; newpager = NULL;
/* Intel MPI library and shared memory "prefetch" */ /* Shared libraries prefetch */
{ {
char *pathbuf, *fullpath; char *pathbuf, *fullpath;
@ -1058,15 +1058,7 @@ static int pager_req_create(ihk_os_t os, int fd, uintptr_t result_pa)
if (pathbuf) { if (pathbuf) {
fullpath = d_path(&file->f_path, pathbuf, PATH_MAX); fullpath = d_path(&file->f_path, pathbuf, PATH_MAX);
if (!IS_ERR(fullpath)) { if (!IS_ERR(fullpath)) {
if (!strncmp("/dev/shm/Intel_MPI", fullpath, 18)) { if (strstr(fullpath, ".so")) {
mf_flags = (MF_PREMAP | MF_ZEROFILL);
dprintk("%s: filename: %s, premap & zerofill\n",
__FUNCTION__, fullpath);
}
else if (strstr(fullpath, "libmpi") ||
strstr(fullpath, "libiomp") ||
strstr(fullpath, "libpthread") ||
strstr(fullpath, "libc.so")) {
mf_flags = MF_PREFETCH; mf_flags = MF_PREFETCH;
dprintk("%s: filename: %s, prefetch\n", dprintk("%s: filename: %s, prefetch\n",
__FUNCTION__, fullpath); __FUNCTION__, fullpath);