From: Greg Kroah-Hartman Date: Tue, 7 Jan 2014 17:47:48 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.76~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bba5d2d92ab5711b1abb94a81370aa1adc67718;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: mm-clear-pmd_numa-before-invalidating.patch --- diff --git a/queue-3.12/mm-clear-pmd_numa-before-invalidating.patch b/queue-3.12/mm-clear-pmd_numa-before-invalidating.patch new file mode 100644 index 00000000000..e4009d93b15 --- /dev/null +++ b/queue-3.12/mm-clear-pmd_numa-before-invalidating.patch @@ -0,0 +1,49 @@ +From mgorman@suse.de Tue Jan 7 09:46:03 2014 +From: Mel Gorman +Date: Tue, 7 Jan 2014 14:00:38 +0000 +Subject: mm: clear pmd_numa before invalidating +To: gregkh@linuxfoundation.org +Cc: athorlton@sgi.com, riel@redhat.com, chegu_vinod@hp.com, Mel Gorman , stable@vger.kernel.org +Message-ID: <1389103248-17617-4-git-send-email-mgorman@suse.de> + +From: Mel Gorman + +commit 67f87463d3a3362424efcbe8b40e4772fd34fc61 upstream. + +On x86, PMD entries are similar to _PAGE_PROTNONE protection and are +handled as NUMA hinting faults. The following two page table protection +bits are what defines them + + _PAGE_NUMA:set _PAGE_PRESENT:clear + +A PMD is considered present if any of the _PAGE_PRESENT, _PAGE_PROTNONE, +_PAGE_PSE or _PAGE_NUMA bits are set. If pmdp_invalidate encounters a +pmd_numa, it clears the present bit leaving _PAGE_NUMA which will be +considered not present by the CPU but present by pmd_present. The +existing caller of pmdp_invalidate should handle it but it's an +inconsistent state for a PMD. This patch keeps the state consistent +when calling pmdp_invalidate. + +Signed-off-by: Mel Gorman +Reviewed-by: Rik van Riel +Cc: Alex Thorlton +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/pgtable-generic.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/mm/pgtable-generic.c ++++ b/mm/pgtable-generic.c +@@ -191,6 +191,9 @@ pgtable_t pgtable_trans_huge_withdraw(st + void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, + pmd_t *pmdp) + { ++ pmd_t entry = *pmdp; ++ if (pmd_numa(entry)) ++ entry = pmd_mknonnuma(entry); + set_pmd_at(vma->vm_mm, address, pmdp, pmd_mknotpresent(*pmdp)); + flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); + } diff --git a/queue-3.12/series b/queue-3.12/series index d7408c6dcf3..9734a1cb8fc 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -109,6 +109,7 @@ intel_pstate-fail-initialization-if-p-state-information-is-missing.patch revert-of-address-handle-address-cells-2-specially.patch mm-numa-serialise-parallel-get_user_page-against-thp-migration.patch mm-numa-call-mmu-notifiers-on-thp-migration.patch +mm-clear-pmd_numa-before-invalidating.patch mm-numa-ensure-anon_vma-is-locked-to-prevent-parallel-thp-splits.patch mm-numa-avoid-unnecessary-work-on-the-failure-path.patch mm-fix-tlb-flush-race-between-migration-and-change_protection_range.patch