aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2014-04-02 12:07:39 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-08 22:53:03 -0400
commit1dc954bd2f85144b9a2959139d41a5f6b9b34712 (patch)
treecb15e3d36f636f85d6a22dced47152c7c561d030 /arch/powerpc
parent9000c17dc0f9c910267d2661225c9d33a227b27e (diff)
powerpc/mm: NUMA pte should be handled via slow path in get_user_pages_fast()
We need to handle numa pte via the slow path Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/gup.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c
index c5f734e20b0f..d8746684f606 100644
--- a/arch/powerpc/mm/gup.c
+++ b/arch/powerpc/mm/gup.c
@@ -36,6 +36,11 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
36 do { 36 do {
37 pte_t pte = ACCESS_ONCE(*ptep); 37 pte_t pte = ACCESS_ONCE(*ptep);
38 struct page *page; 38 struct page *page;
39 /*
40 * Similar to the PMD case, NUMA hinting must take slow path
41 */
42 if (pte_numa(pte))
43 return 0;
39 44
40 if ((pte_val(pte) & mask) != result) 45 if ((pte_val(pte) & mask) != result)
41 return 0; 46 return 0;
@@ -75,6 +80,14 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
75 if (pmd_none(pmd) || pmd_trans_splitting(pmd)) 80 if (pmd_none(pmd) || pmd_trans_splitting(pmd))
76 return 0; 81 return 0;
77 if (pmd_huge(pmd) || pmd_large(pmd)) { 82 if (pmd_huge(pmd) || pmd_large(pmd)) {
83 /*
84 * NUMA hinting faults need to be handled in the GUP
85 * slowpath for accounting purposes and so that they
86 * can be serialised against THP migration.
87 */
88 if (pmd_numa(pmd))
89 return 0;
90
78 if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next, 91 if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next,
79 write, pages, nr)) 92 write, pages, nr))
80 return 0; 93 return 0;