diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-06-20 05:00:24 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-21 02:01:57 -0400 |
commit | a00e7bea0dde6a44b9bbe84f30b731d9ec73858b (patch) | |
tree | 295e7fa1b52b6dbf846e67f408fd42fb44b7c773 /arch/powerpc/mm | |
parent | 7888b4ddb44dccd68bc20d0dc4425707dff88c72 (diff) |
powerpc: disable assert_pte_locked for collapse_huge_page
With THP we set pmd to none, before we do pte_clear. Hence we can't
walk page table to get the pte lock ptr and verify whether it is locked.
THP do take pte lock before calling pte_clear. So we don't change the locking
rules here. It is that we can't use page table walking to check whether
pte locks are held with THP.
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/mm')
-rw-r--r-- | arch/powerpc/mm/pgtable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 214130a4edc6..edda589795c3 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c | |||
@@ -235,6 +235,14 @@ void assert_pte_locked(struct mm_struct *mm, unsigned long addr) | |||
235 | pud = pud_offset(pgd, addr); | 235 | pud = pud_offset(pgd, addr); |
236 | BUG_ON(pud_none(*pud)); | 236 | BUG_ON(pud_none(*pud)); |
237 | pmd = pmd_offset(pud, addr); | 237 | pmd = pmd_offset(pud, addr); |
238 | /* | ||
239 | * khugepaged to collapse normal pages to hugepage, first set | ||
240 | * pmd to none to force page fault/gup to take mmap_sem. After | ||
241 | * pmd is set to none, we do a pte_clear which does this assertion | ||
242 | * so if we find pmd none, return. | ||
243 | */ | ||
244 | if (pmd_none(*pmd)) | ||
245 | return; | ||
238 | BUG_ON(!pmd_present(*pmd)); | 246 | BUG_ON(!pmd_present(*pmd)); |
239 | assert_spin_locked(pte_lockptr(mm, pmd)); | 247 | assert_spin_locked(pte_lockptr(mm, pmd)); |
240 | } | 248 | } |