diff options
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/pgtable_types.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index ec8a1fc9505d..3c32db8c539d 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -64,6 +64,26 @@ | |||
64 | #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) | 64 | #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) |
65 | #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE) | 65 | #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE) |
66 | 66 | ||
67 | /* | ||
68 | * _PAGE_NUMA indicates that this page will trigger a numa hinting | ||
69 | * minor page fault to gather numa placement statistics (see | ||
70 | * pte_numa()). The bit picked (8) is within the range between | ||
71 | * _PAGE_FILE (6) and _PAGE_PROTNONE (8) bits. Therefore, it doesn't | ||
72 | * require changes to the swp entry format because that bit is always | ||
73 | * zero when the pte is not present. | ||
74 | * | ||
75 | * The bit picked must be always zero when the pmd is present and not | ||
76 | * present, so that we don't lose information when we set it while | ||
77 | * atomically clearing the present bit. | ||
78 | * | ||
79 | * Because we shared the same bit (8) with _PAGE_PROTNONE this can be | ||
80 | * interpreted as _PAGE_NUMA only in places that _PAGE_PROTNONE | ||
81 | * couldn't reach, like handle_mm_fault() (see access_error in | ||
82 | * arch/x86/mm/fault.c, the vma protection must not be PROT_NONE for | ||
83 | * handle_mm_fault() to be invoked). | ||
84 | */ | ||
85 | #define _PAGE_NUMA _PAGE_PROTNONE | ||
86 | |||
67 | #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ | 87 | #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ |
68 | _PAGE_ACCESSED | _PAGE_DIRTY) | 88 | _PAGE_ACCESSED | _PAGE_DIRTY) |
69 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ | 89 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ |