[PATCH v3 1/2] x86/mm/ident_map: Add PUD level 1GB page support

2017-05-03 Thread Xunlei Pang
The current kernel_ident_mapping_init() creates the identity mapping always using 2MB page(PMD level), this patch adds the 1GB page(PUD level) support. The primary advantage would be better TLB coverage/performance, because we'd utilize 1GB TLBs instead of 2MB ones. It is also useful for machines

[PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-03 Thread Xunlei Pang
Kexec setups all identity mappings before booting into the new kernel, and this will cause extra memory consumption for paging structures which is quite considerable on modern machines with huge number of memory. E.g. On one 32TB machine, in kdump case, it could waste around 128MB (around 4MB/TB)