[RFC PATCH 3/3] mm/hugetlb: Remove pmd_huge_split_prepare
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Thu Jul 27 20:50:25 AEST 2017
On 07/27/2017 02:07 PM, Aneesh Kumar K.V wrote:
> diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> index 8c8fb6fbdabe..b856e130c678 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> @@ -164,8 +164,6 @@ extern pmd_t hash__pmdp_collapse_flush(struct vm_area_struct *vma,
> extern void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
> pgtable_t pgtable);
> extern pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp);
> -extern void hash__pmdp_huge_split_prepare(struct vm_area_struct *vma,
>
> @@ -1956,14 +1956,39 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
> return __split_huge_zero_page_pmd(vma, haddr, pmd);
> }
>
....
> + */
> + old_pmd = pmdp_invalidate(vma, haddr, pmd);
> +
> + page = pmd_page(old_pmd);
> VM_BUG_ON_PAGE(!page_count(page), page);
> page_ref_add(page, HPAGE_PMD_NR - 1);
> - write = pmd_write(*pmd);
> - young = pmd_young(*pmd);
> - soft_dirty = pmd_soft_dirty(*pmd);
> -
> - pmdp_huge_split_prepare(vma, haddr, pmd);
> + write = pmd_write(old_pmd);
> + young = pmd_young(old_pmd);
> + dirty = pmd_dirty(*pmd);
This should be
dirty = pmd_dirty(old_pmd);
> + soft_dirty = pmd_soft_dirty(old_pmd);
> + /*
> + * withdraw the table only after we mark the pmd entry invalid
> + */
> pgtable = pgtable_trans_huge_withdraw(mm, pmd);
-aneesh
More information about the Linuxppc-dev
mailing list