diff options
author | Nitin Gupta <nitin.m.gupta@oracle.com> | 2016-07-29 10:54:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-29 20:49:16 +0300 |
commit | 7bc3777ca19cf9ecc5533980210f29c51df7fe5e (patch) | |
tree | baaa60bd0a6dfe46a902d7e151005b013f340e7f /arch/sparc/mm/fault_64.c | |
parent | af1b1a9b36b8f9d583d4b4f90dd8946ed0cd4bd0 (diff) | |
download | linux-7bc3777ca19cf9ecc5533980210f29c51df7fe5e.tar.xz |
sparc64: Trim page tables for 8M hugepages
For PMD aligned (8M) hugepages, we currently allocate
all four page table levels which is wasteful. We now
allocate till PMD level only which saves memory usage
from page tables.
Also, when freeing page table for 8M hugepage backed region,
make sure we don't try to access non-existent PTE level.
Orabug: 22630259
Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/fault_64.c')
-rw-r--r-- | arch/sparc/mm/fault_64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 3a16ba0dc356..e16fdd28a931 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -111,8 +111,8 @@ static unsigned int get_user_insn(unsigned long tpc) if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp))) goto out_irq_enable; -#ifdef CONFIG_TRANSPARENT_HUGEPAGE - if (pmd_trans_huge(*pmdp)) { +#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE) + if (is_hugetlb_pmd(*pmdp)) { pa = pmd_pfn(*pmdp) << PAGE_SHIFT; pa += tpc & ~HPAGE_MASK; |