xpmem: support large page

1. try to use as large page as possible on attach
2. pre-map resident remote pages on attach

Change-Id: I5580682a4199e94085a9bad9ce3958a0f14cdcea
This commit is contained in:
Yoshihisa Morizumi
2021-01-08 16:56:32 +09:00
committed by Masamichi Takagi
parent 3aaa5350f0
commit d2db639853
68 changed files with 4878 additions and 244 deletions

View File

@@ -31,6 +31,7 @@
#include <page.h>
#include <limits.h>
#include <syscall.h>
#include <bitops.h>
#include <rusage_private.h>
#include <memory.h>
#include <ihk/debug.h>
@@ -1511,7 +1512,7 @@ recheck:
goto out;
}
addr = do_mmap(addr, len, prot, flags, fd, off0);
addr = do_mmap(addr, len, prot, flags, fd, off0, 0, NULL);
error = 0;
out:
@@ -1840,7 +1841,7 @@ int arch_map_vdso(struct process_vm *vm)
vrflags |= VR_PROT_READ | VR_PROT_EXEC;
vrflags |= VRFLAG_PROT_TO_MAXPROT(vrflags);
error = add_process_memory_range(vm, (intptr_t)s, (intptr_t)e,
NOPHYS, vrflags, NULL, 0, PAGE_SHIFT, &range);
NOPHYS, vrflags, NULL, 0, PAGE_SHIFT, NULL, &range);
if (error) {
ekprintf("ERROR: adding memory range for vdso. %d\n", error);
goto out;
@@ -1872,7 +1873,8 @@ int arch_map_vdso(struct process_vm *vm)
vrflags |= VR_PROT_READ;
vrflags |= VRFLAG_PROT_TO_MAXPROT(vrflags);
error = add_process_memory_range(vm, (intptr_t)s, (intptr_t)e,
NOPHYS, vrflags, NULL, 0, PAGE_SHIFT, &range);
NOPHYS, vrflags, NULL, 0,
PAGE_SHIFT, NULL, &range);
if (error) {
ekprintf("ERROR: adding memory range for vvar. %d\n", error);
goto out;