Hugetlb pages are incredibly architecture specific at the Memory Management Unit (MMU) level. For example, every arch has a different way of handling the page table entries. This leads to some tricky rules and restrictions on what can be done with huge pages. The following sections describe the issues surrounding these architecture limitations on a per-architecture basis.
The powerpc architecture makes use of segmentation to reduce the flushing of virtual to physical address translations. Each segment is 256M in size and can contain only one page size. For addresses below 4GB, 256MB is the page size granularity. For 64bit addresses above 4GB, the page size granularity is 1TB.
On ia64, 64-bit virtual address space is divided into eight equal sized regions. Associated with each region is a control register that specifies page size for that region, as well as an address space number (for implementing multiple address space). This region based page size and address space number are used as integral part of virtual-to-physical TLB translation, assisted by VHPT (virtually hashed page table -- an extension of processor's TLB that resides in memory and is automatically searched for translations by the processor).
linux-ia64 currently uses one mode of VHPT which restrict one page size for each region and assigns one region for hugetlb use. All other regions are configured to use base page size. In this mode, if the VHPT finds the translation it will use the page size assigned to the region the translation is in. In the other format, an explicit page size is kept with the translation. This makes the translation entry larger, and thus uses up more cache. Finding an effective trade-off between TLB, cache and VHPT performance is a current research issue (see A survey of large page support for more information)
x86 / x86-64
The x86 architecture has a relatively simple method of doing huge pages: in the page table tree the lowest tier of page table entries just gets consolidated into the "one level above that" PTE entry with a special bit set. This means that there are effectively three requirements on huge pages