Skip to content

GB pages (PDP1GB) support for the kernel direct mapping

Andi Kleen lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8GBPAGES: Handle kernel near memory hole in clear_kernel_mappingarch/x86/mm/init_64.c+19 -12 replies
2/8GBPAGES: Add feature macros for the gbpages cpuid bitinclude/asm-x86/cpufeature.h+2 -00 replies
3/8GBPAGES: Split LARGE_PAGE_SIZE/MASK into PUD_PAGE_SIZE/PMD_PAGE_SIZEarch/x86/boot/compressed/head_64.S arch/x86/kernel/head_64.S arch/x86/kernel/pci-gart_64.c +3 more+15 -120 replies
4/8GBPAGES: Add pgtable accessor functions for GB pagesinclude/asm-x86/pgtable_64.h+3 -00 replies
5/8GBPAGES: Support gbpages in pagetable dumparch/x86/mm/fault_64.c+1 -10 replies
6/8GBPAGES: Add an option to disable direct mapping gbpages and a global variableDocumentation/x86_64/boot-options.txt arch/x86/mm/init_64.c include/asm-x86/pgtable_64.h+17 -01 reply
7/8GBPAGES: Implement GBpages support in change_page_attr()arch/x86/mm/pageattr_64.c+118 -310 replies
8/8GBPAGES: Do kernel direct mapping at boot using GB pagesarch/x86/mm/init_64.c+54 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH] [0/8] GB pages (PDP1GB) support for the kernel direct mapping

This patchkit implement GB pages support for AMD Fam10h CPUs. This patchkit only implements it for the kernel direct mapping for now; support for hugetlbfs is upcomming.

This allows to map the kernel direct mapping using 1GB TLBs instead of 2MB TLBs and get hopefully less TLB misses for the kernel.

The GB pages are only implemented for 64bit (because the CPU only implements them for long mode) and also only for data pages (because Fam10h doesn't have GB ITLBs and AMD recommends against running code in them)

There is an option to turn them off (direct_gbpages=off), although I hope that won't be needed.

Also includes one generic bug fix for clear_page_kernel.

-Andi