Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713715 > unrolled thread

Re: [PATCHv4 11/14] x86/mm: Replace compile-time checks for 5-level with runtime-time

Started byIngo Molnar <mingo@kernel.org>
First post2017-08-17 11:20 +0200
Last post2017-08-17 11:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv4 11/14] x86/mm: Replace compile-time checks for 5-level  with runtime-time Ingo Molnar <mingo@kernel.org> - 2017-08-17 11:20 +0200

#1713715 — Re: [PATCHv4 11/14] x86/mm: Replace compile-time checks for 5-level with runtime-time

FromIngo Molnar <mingo@kernel.org>
Date2017-08-17 11:20 +0200
SubjectRe: [PATCHv4 11/14] x86/mm: Replace compile-time checks for 5-level with runtime-time
Message-ID<ufp87-2O3-43@gated-at.bofh.it>
* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:

> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -459,7 +459,7 @@ static noinline int vmalloc_fault(unsigned long address)
>  	if (pgd_none(*pgd)) {
>  		set_pgd(pgd, *pgd_ref);
>  		arch_flush_lazy_mmu_mode();
> -	} else if (CONFIG_PGTABLE_LEVELS > 4) {
> +	} else if (!p4d_folded) {

BTW: the new name is worse I think, not just the cryptic 'p4d' acronym that will 
generally be much less well known than '5 level page tables', but also the logic 
inversion from common usage patterns that generally want to do something if the 
'fifth level is not folded' i.e. if 'the fifth level is enabled'.

How about calling it 'pgtable_l5_enabled'? The switch tells us that the fifth 
level of our page tables is enabled. Harmonizes with '5 level paging support'. It 
also won't have the logic inversion but can be used directly:

	} else if (pgtable_l5_enabled) {

( In theory we could use that nomenclature for PAE as well, 'pgtable_l3_enabled', 
  or so - although PAE is special in more ways than just one more level, so it 
  might not be practical. )

Thanks,

	Ingo

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web