3 ms·
They have the advantage that they can be used opportunistically. Huge pages require contiguous physical memory regions which may not always be available due to
by the8472 8y ago
They have the advantage that they can be used opportunistically. Huge pages require contiguous physical memory regions which may not always be available due to fragmentation. So the kernel converting allocations to huge pages on a best-effort basis gives you the benefit of huge pages without the hard errors and constraints that relying on huge pages reserved at boot time entails.
Also note that THP opt-in instead of opt-out is already possible. You just have to set the sysfs control to "madvise" instead of "always", many distros do this by default already.