I have a number of performance-intensive tasks that I need to run regularly, such as compiling and linking large programs, and I'd like to see if superpages are of help here. I've had great long-term success with low-level changes to other aspects of the programs, such as the malloc default zone, and would like to see if changing the page size can provide similarly fruitful results. There is some evidence that that may be the case (https://easyperf.net/blog/2022/09/01/Utilizing-Huge-Pages-For-Code#option2-remap-the-code-section-at-runtime and https://xmrig.com/docs/miner/hugepages). However, when I try, mmap(NULL, 2 * 1024 * 1024, PROT_READ, MAP_ANON | MAP_PRIVATE, VM_FLAGS_SUPERPAGE_SIZE_2MB, 0) for example, it always fails. Is there any way to use superpages?
3
0
2.7k