This bug is on #236, but is expected to be left as future work, so will need a fix after that PR merges.
The kernel can and will allocate huge pages when running with vm.huge_mapping_enabled=false. However, some tests fail because the detected number of pages reported in /proc/memstat is not as expected. Sometimes it reads a page less than expected and sometimes 0. The computation function also appears to be called more often that the userspace file is read.
Here is a test I was using to investigate: mmap_hugepages.c
I see two possible things causing this:
- Pages are not being allocated correctly as huge pages (15 when 16 is expected) and huge pages are being spontaneously split making future statistics be 0.
- The statistics are incorrectly computed. This could be because the page tables are being incorrectly scanned, for example.
This bug is on #236, but is expected to be left as future work, so will need a fix after that PR merges.
The kernel can and will allocate huge pages when running with
vm.huge_mapping_enabled=false. However, some tests fail because the detected number of pages reported in/proc/memstatis not as expected. Sometimes it reads a page less than expected and sometimes 0. The computation function also appears to be called more often that the userspace file is read.Here is a test I was using to investigate: mmap_hugepages.c
I see two possible things causing this: