]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2014 18:20:21 +0000 (10:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2014 18:20:21 +0000 (10:20 -0800)
added patches:
mm-numa-clear-numa-hinting-information-on-mprotect.patch

queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch [new file with mode: 0644]
queue-3.12/series

diff --git a/queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch b/queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch
new file mode 100644 (file)
index 0000000..2ee5933
--- /dev/null
@@ -0,0 +1,49 @@
+From mgorman@suse.de  Tue Jan  7 10:18:32 2014
+From: Mel Gorman <mgorman@suse.de>
+Date: Tue,  7 Jan 2014 14:00:44 +0000
+Subject: mm: numa: clear numa hinting information on mprotect
+To: gregkh@linuxfoundation.org
+Cc: athorlton@sgi.com, riel@redhat.com, chegu_vinod@hp.com, Mel Gorman <mgorman@suse.de>, stable@vger.kernel.org
+Message-ID: <1389103248-17617-10-git-send-email-mgorman@suse.de>
+
+From: Mel Gorman <mgorman@suse.de>
+
+commit 1667918b6483b12a6496bf54151b827b8235d7b1 upstream.
+
+On a protection change it is no longer clear if the page should be still
+accessible.  This patch clears the NUMA hinting fault bits on a
+protection change.
+
+Signed-off-by: Mel Gorman <mgorman@suse.de>
+Reviewed-by: Rik van Riel <riel@redhat.com>
+Cc: Alex Thorlton <athorlton@sgi.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/huge_memory.c |    2 ++
+ mm/mprotect.c    |    2 ++
+ 2 files changed, 4 insertions(+)
+
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -1483,6 +1483,8 @@ int change_huge_pmd(struct vm_area_struc
+               pmd_t entry;
+               if (!prot_numa) {
+                       entry = pmdp_get_and_clear(mm, addr, pmd);
++                      if (pmd_numa(entry))
++                              entry = pmd_mknonnuma(entry);
+                       entry = pmd_modify(entry, newprot);
+                       BUG_ON(pmd_write(entry));
+                       set_pmd_at(mm, addr, pmd, entry);
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
+@@ -56,6 +56,8 @@ static unsigned long change_pte_range(st
+                       if (!prot_numa) {
+                               ptent = ptep_modify_prot_start(mm, addr, pte);
++                              if (pte_numa(ptent))
++                                      ptent = pte_mknonnuma(ptent);
+                               ptent = pte_modify(ptent, newprot);
+                               updated = true;
+                       } else {
index 01526e250f5fdab80a34e908cba9f1c1b71018ba..ac7d17a6ab66e3c6abe096cde79453b2101b478d 100644 (file)
@@ -114,6 +114,7 @@ mm-numa-do-not-clear-pte-for-pte_numa-update.patch
 mm-numa-ensure-anon_vma-is-locked-to-prevent-parallel-thp-splits.patch
 mm-numa-avoid-unnecessary-work-on-the-failure-path.patch
 sched-numa-skip-inaccessible-vmas.patch
+mm-numa-clear-numa-hinting-information-on-mprotect.patch
 mm-mempolicy-correct-putback-method-for-isolate-pages-if-failed.patch
 mm-compaction-respect-ignore_skip_hint-in-update_pageblock_skip.patch
 mm-memory-failure.c-recheck-pagehuge-after-hugetlb-page-migrate-successfully.patch