[Devel] [PATCH rh7 v2] x86/mm: Use dirty bit for non-linear files ptes
Andrey Ryabinin
aryabinin at virtuozzo.com
Mon Oct 3 02:19:22 PDT 2016
On 10/03/2016 11:56 AM, Andrey Ryabinin wrote:
> Backported patchset "Workaround for Xeon Phi PTE A/D bits erratum"
> caused - kernel BUG at mm/rmap.c:1305!
>
> _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>
> ---
> Changes since v1 - fixed typo
> s/_PAGE_PIT_DIRTY/_PAGE_BIT_DIRTY
>
> arch/x86/include/asm/pgtable_types.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
> index 6e43ed0..5a6a5be 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
> +/* TODO: FIX: The following bit is affected by the "KNL4 erratum": */
> #define _PAGE_BIT_FILE _PAGE_BIT_DIRTY
Self NACK. This can be masked out in pte_none(), probably safer to backport patches
removing remap_file_pages()
>
> #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
> #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
>
More information about the Devel
mailing list