2 ms·
Applications that benefit from huge pages should have/add support for them. Transparent huge pages are a hack.
by karmakaze 8y ago
Applications that benefit from huge pages should have/add support for them. Transparent huge pages are a hack.
- the8472 8y agoThey 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.