stack: grow on page fault

The steps of the technique to replace stack with hugetlbfs map are as
follows:

(1) Prepare a hugetlbfs map with the size of rlim_cur
(2) Copy the active region of the stack to the hugetlbfs map.
    The range to copy is determined by reading /proc/[pid]/maps.
(3) Replace the stack map with the hugetlbfs map

The step (2) tries to copy a huge region if McKernel doesn't grow the
stack at run-time.

Change-Id: I5858c35b5c26dd0a42cccf9e3cc4c64b1a81f160
This commit is contained in:
Masamichi Takagi
2020-07-16 16:58:23 +09:00
committed by Masamichi Takagi
parent a20e1acf01
commit 40f8091fab
2 changed files with 67 additions and 17 deletions

View File

@@ -139,7 +139,6 @@ static void hugefileobj_free(struct memobj *memobj)
struct memobj_ops hugefileobj_ops = {
.free = hugefileobj_free,
.get_page = hugefileobj_get_page,
};
void hugefileobj_cleanup(void)