[RFC] Implementing HUGEPAGE on MPC 8xx
Christophe Leroy
christophe.leroy at c-s.fr
Wed Jun 8 17:03:56 AEST 2016
Hello,
MPC 8xx has several page sizes: 4k, 16k, 512k and 8M.
Today, 4k and 16k sizes are implemented as normal page sizes and 8M is
used for mapping linear memory space in kernel.
I'd like to implement HUGE PAGE to reduce TLB misses from user apps.
In 4k mode, PAGE offset is 12 bits, PTE offset is 10 bits and PGD offset
is 10 bits
In 16k mode, PAGE offset is 14 bits, PTE offset is 12 bits and PGD
offset is 6 bits
In 4k mode, we could use 512k HUGE PAGE and have a HPAGE offset of 19
bits so HPTE offset of 3 bits and PGD offset of 10 bits
In 16k mode, we could use both 512k HUGE PAGE and 8M HUGE PAGE and have:
* For 512k: a HPAGE offset of 19 bits so HPTE offset of 7 bits and PGD
offset of 6 bits
* For 8M: a HPAGE offset of 23 bits so HPTE offset of 3 bits and PGD
offset of 6 bits
In see in the current ppc kernel that for PPC32, SYS_SUPPORTS_HUGETLBFS
is selected only if we have PHYS_64BIT.
What is the reason for only implementing HUGETLBFS with 64 bits phys
addresses ?
From your point of view, what would be the best approach to extend
support of HUGE PAGES to PPC_8xx ?
Would the good starting point be to implement a hugepagetlb-8xx.c from
hugepagetlb-book3e.c ?
Christophe
More information about the Linuxppc-dev
mailing list