The Transparent Huge Pages(THP) support in recent Linux kernels allows automatic promotion/demotion between different page sizes (e.g., 4KB and 2MB in x86-64).
But I am not sure if THP can also promote/demote page sizes between 4KB and 1GB pages or between 2MB and 1GB pages.
Can somebody comment on this?
Transparent Huge Pages (THP) is a Linux memory management system that reduces the overhead of Translation Lookaside Buffer (TLB) lookups on machines with large amounts of memory by using larger memory pages.
HugePages is useful for both 32-bit and 64-bit configurations. HugePage sizes vary from 2 MB to 256 MB, depending on the kernel version and the hardware architecture.
According to this article
http://lwn.net/Articles/423584/
The current patch only works with anonymous pages; the work to integrate huge pages with the page cache has not yet been done. It also only handles one huge page size (2MB). Even so, some useful performance improvements can be seen. Mel Gorman ran some benchmarks showing improvements of up to 10% or so in some situations. In general, the results were not as good as could be obtained with hugetlbfs, but THP is much more likely to actually be used.
So, it seems that THP support implemented for 4k -> 2M/4M merging/splitting.
Also, in kernel sources I've seen that there is a split_huge_page_pmd function and as PMD
undergoes to splitting and PMD
manages page entries on top of PTE's
that has a fixed 4k size I supposed that PMD
size (2M/4M) is the maximum transparent huge page size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With