[Devel] [PATCH rh7] x86/mm: Use dirty bit for non-linear files ptes
Andrey Ryabinin
aryabinin at virtuozzo.com
Mon Oct 3 01:46:54 PDT 2016
backported patchset "Workaround for Xeon Phi PTE A/D bits erratum"
_PAGE_BIT_FILE is not present in upstream but still present
in RHEL7 kernel, so they did this:
/* Pick a bit unaffected by the "KNL4 erratum": */
#define _PAGE_BIT_FILE _PAGE_BIT_PSE
Which conflicts with ours code:
#define _PAGE_SWP_SOFT_DIRTY _PAGE_PSE
So, as temporary fix restore old value for _PAGE_FILE.
If we care about supporting Xeon Phi we could backport
remap_file_pages() emulation from upstream which removes uses _PAGE_FILE.
https://jira.sw.ru/browse/PSBM-52992
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
arch/x86/include/asm/pgtable_types.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 6e43ed0..5828193 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -29,12 +29,8 @@
/* - if the user mapped it with PROT_NONE; pte_present gives true */
#define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL
/* - set: nonlinear file mapping, saved PTE; unset:swap */
-#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
-/* Pick a bit unaffected by the "KNL4 erratum": */
-#define _PAGE_BIT_FILE _PAGE_BIT_PSE
-#else
-#define _PAGE_BIT_FILE _PAGE_BIT_DIRTY
-#endif
+/* TODO: FIX: The following bit is affected by the "KNL4 erratum": */
+#define _PAGE_BIT_FILE _PAGE_PIT_DIRTY
#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
--
2.7.3
More information about the Devel
mailing list