Files
mckernel/kernel
Dominique Martinet 39f9d7fdff Handle hugetlbfs file mapping
Hugetlbfs file mappings are handled differently than regular files:
 - pager_req_create will tell us the file is in a hugetlbfs
 - allocate memory upfront, we need to fail if not enough memory
 - the memory needs to be given again if another process maps the same
   file

This implementation still has some hacks, in particular, the memory
needs to be freed when all mappings are done and the file has been
deleted/closed by all processes.
We cannot know when the file is closed/unlinked easily, so clean up
memory when all processes have exited.

To test, install libhugetlbfs and link a program with the additional
LDFLAGS += -B /usr/share/libhugetlbfs -Wl,--hugetlbfs-align

Then run with HUGETLB_ELFMAP=RW set, you can check this works with
HUGETLB_DEBUG=1 HUGETLB_VERBOSE=2

Change-Id: I327920ff06efd82e91b319b27319f41912169af1
2018-10-11 08:54:13 +00:00
..
2018-10-11 08:54:13 +00:00
2018-07-26 14:16:31 +09:00
2014-03-30 16:14:19 +09:00
2018-10-11 08:54:13 +00:00
2018-10-04 14:31:02 +09:00
2018-10-11 08:54:13 +00:00
2018-09-04 19:52:10 +09:00
2016-03-08 15:19:03 +09:00
2013-06-06 11:53:30 -05:00
2017-09-04 08:53:32 +09:00
2018-10-11 08:54:13 +00:00
2018-10-11 08:54:13 +00:00