diff for duplicates of <20120822011213.GM29978@redhat.com> diff --git a/a/1.txt b/N1/1.txt index d815cf2..68cb00c 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -76,3 +76,41 @@ Thanks, Andrea === +>From 59af0d4348eb07087097e310f60422b994dd3a2c Mon Sep 17 00:00:00 2001 +From: Andrea Arcangeli <aarcange@redhat.com> +Date: Tue, 21 Aug 2012 19:32:23 +0200 +Subject: [PATCH] thp: make pmd_present more accurate + +In many places !pmd_present has been converted to pmd_none. For pmds +that's equivalent and pmd_none is quicker so using pmd_none is +better. + +However we should provide a more accurate pmd_present too. This will +avoid the risk of code thinking the pmd is non present because it's +under __split_huge_page_map, see the pmd_mknotpresent there and the +comment above it. + +Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> +--- + arch/x86/include/asm/pgtable.h | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h +index 49afb3f..b49e70d 100644 +--- a/arch/x86/include/asm/pgtable.h ++++ b/arch/x86/include/asm/pgtable.h +@@ -415,7 +415,13 @@ static inline int pte_hidden(pte_t pte) + + static inline int pmd_present(pmd_t pmd) + { +- return pmd_flags(pmd) & _PAGE_PRESENT; ++ /* ++ * Checking for _PAGE_PSE is needed too because ++ * split_huge_page will temporarily clear the present bit (but ++ * the _PAGE_PSE flag will remain set at all times while the ++ * _PAGE_PRESENT bit is clear). ++ */ ++ return pmd_flags(pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PSE); + } + + static inline int pmd_none(pmd_t pmd) diff --git a/a/content_digest b/N1/content_digest index e098dbb..03e6e0a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -91,6 +91,44 @@ "Thanks,\n" "Andrea\n" "\n" - === + "===\n" + ">From 59af0d4348eb07087097e310f60422b994dd3a2c Mon Sep 17 00:00:00 2001\n" + "From: Andrea Arcangeli <aarcange@redhat.com>\n" + "Date: Tue, 21 Aug 2012 19:32:23 +0200\n" + "Subject: [PATCH] thp: make pmd_present more accurate\n" + "\n" + "In many places !pmd_present has been converted to pmd_none. For pmds\n" + "that's equivalent and pmd_none is quicker so using pmd_none is\n" + "better.\n" + "\n" + "However we should provide a more accurate pmd_present too. This will\n" + "avoid the risk of code thinking the pmd is non present because it's\n" + "under __split_huge_page_map, see the pmd_mknotpresent there and the\n" + "comment above it.\n" + "\n" + "Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>\n" + "---\n" + " arch/x86/include/asm/pgtable.h | 8 +++++++-\n" + " 1 files changed, 7 insertions(+), 1 deletions(-)\n" + "\n" + "diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h\n" + "index 49afb3f..b49e70d 100644\n" + "--- a/arch/x86/include/asm/pgtable.h\n" + "+++ b/arch/x86/include/asm/pgtable.h\n" + "@@ -415,7 +415,13 @@ static inline int pte_hidden(pte_t pte)\n" + " \n" + " static inline int pmd_present(pmd_t pmd)\n" + " {\n" + "-\treturn pmd_flags(pmd) & _PAGE_PRESENT;\n" + "+\t/*\n" + "+\t * Checking for _PAGE_PSE is needed too because\n" + "+\t * split_huge_page will temporarily clear the present bit (but\n" + "+\t * the _PAGE_PSE flag will remain set at all times while the\n" + "+\t * _PAGE_PRESENT bit is clear).\n" + "+\t */\n" + "+\treturn pmd_flags(pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PSE);\n" + " }\n" + " \n" + static inline int pmd_none(pmd_t pmd) -314f910f78b4f0510a6f837cf56f8c0167b6767e9a7c92cb9dc8634df003efc0 +1a9230a32f940a9a25d61759484e9de9c1d647c4a425bcd35cf2d5240f737333
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.