On Sun Jun 2 15:24:59 2024 +0000, Paul Gofman wrote:
Regarding the value for LargePageMinimum, why should it be attempted to determined from Linux somehow? Linux doesn't give much of explicit control for large pages, and we should care more about what Windows gives here as that what apps will expect. I guess we'd be better off with testing the value on Windows (which is probably just constant?) and use that one. Then, how exactly to back that with actual THPs is beyond our control (we can only hint with madvise whether to use huge pages or not).
Does it not? IMO, Windows seems to provide no control over the large page size, going so far as to restrict the size provided to `CreateFileMapping` and `VirtualAlloc` to be a multiple of `GetLargePageMiniumum()`, the minimum large page size supported by the processor. Contrast it with mmap (and memfd_create), which allow setting a configurable huge page size with MAP_HUGE_<SIZE>/`MAP_HUGE_SHIFT << log2(SIZE)`