Re: [PATCHv7 08/19] x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable

2017-09-28 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > #define P4D_SHIFT39 > -#define PTRS_PER_P4D 512 > +#define __PTRS_PER_P4D 512 > +#define PTRS_PER_P4D ptrs_per_p4d > #define P4D_SIZE (_AC(1, UL) << P4D_SHIFT) > #define P4D_MASK (~(P4D_SIZE - 1)) PTRS_PER_P4D_MAX would be a better name than ra

Re: [PATCHv7 08/19] x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable

2017-09-19 Thread Kirill A. Shutemov
On Mon, Sep 18, 2017 at 10:55:42AM +, Kirill A. Shutemov wrote: > For boot-time switching between 4- and 5-level paging we need to be able > to fold p4d page table level at runtime. It requires variable > PGDIR_SHIFT and PTRS_PER_P4D. > > The change doesn't affect the kernel image size much: >

[PATCHv7 08/19] x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable

2017-09-18 Thread Kirill A. Shutemov
For boot-time switching between 4- and 5-level paging we need to be able to fold p4d page table level at runtime. It requires variable PGDIR_SHIFT and PTRS_PER_P4D. The change doesn't affect the kernel image size much: textdata bss dec hex filename 107101724879964 8601