Skip to contentSkip to conversation

powerpc/mm/4k: don't allocate larger pmd page table for 4k

PATCH Applied Aneesh Kumar K.V 3 participants 3 messages Jan 4, 2017 – Jan 27, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mm/4k: don't allocate larger pmd page table for 4k

We now support THP with both 64k and 4K page size configuration for radix. (hash only support THP with 64K page size). Hence we will have CONFIG_TRANSPARENT_HUGEPAGE enabled for both PPC_64K and PPC_4K config. Since we only need large pmd page table with hash configuration (to store the slot information in the second half of the table) restrict the large pmd page table to THP and 64K configs.

---
 arch/powerpc/include/asm/book3s/64/hash.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/book3s/64/hash.h +2 -2
index f61cad3de4e6..5ae0596aa7e0 100644
@@ -33,9 +33,9 @@
 				 H_PUD_INDEX_SIZE + H_PGD_INDEX_SIZE + PAGE_SHIFT)
 #define H_PGTABLE_RANGE		(ASM_CONST(1) << H_PGTABLE_EADDR_SIZE)
 
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) &&  defined(CONFIG_PPC_64K_PAGES)
 /*
- * only with hash we need to use the second half of pmd page table
+ * only with hash 64k we need to use the second half of pmd page table
  * to store pointer to deposited pgtable_t
  */
 #define H_PMD_CACHE_INDEX	(H_PMD_INDEX_SIZE + 1)
Signature · 1 line
2.10.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Aneesh Kumar K.V

We now support THP with both 64k and 4K page size configuration for radix. (hash only support THP with 64K page size). Hence we

Can be a different sentence ^^^^^^^ as well. Small nit.

Quoted 7 lines

will have CONFIG_TRANSPARENT_HUGEPAGE enabled for both PPC_64K and PPC_4K config. Since we only need large pmd page table with hash configuration (to store the slot information in the second half of the table) restrict the large pmd page table to THP and 64K configs.

#2 lore raw
In reply to Aneesh Kumar K.V
Quoted 10 lines · Aneesh Kumar K.V

We now support THP with both 64k and 4K page size configuration for radix. (hash only support THP with 64K page size). Hence we will have CONFIG_TRANSPARENT_HUGEPAGE enabled for both PPC_64K and PPC_4K config. Since we only need large pmd page table with hash configuration (to store the slot information in the second half of the table) restrict the large pmd page table to THP and 64K configs.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8ad43336b5c1ad9ac945148cb5e26a

cheers