Commit 1dc954bd2f85144b9a2959139d41a5f6b9b34712
Committed by
Benjamin Herrenschmidt
1 parent
9000c17dc0
Exists in
master
and in
13 other branches
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>
Showing 1 changed file with 13 additions and 0 deletions Side-by-side Diff
arch/powerpc/mm/gup.c
... | ... | @@ -36,6 +36,11 @@ |
36 | 36 | do { |
37 | 37 | pte_t pte = ACCESS_ONCE(*ptep); |
38 | 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 | 45 | if ((pte_val(pte) & mask) != result) |
41 | 46 | return 0; |
... | ... | @@ -75,6 +80,14 @@ |
75 | 80 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) |
76 | 81 | return 0; |
77 | 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 | 91 | if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next, |
79 | 92 | write, pages, nr)) |
80 | 93 | return 0; |