From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, "Kirill A . Shutemov" <kirill@shutemov.name> Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 3/3] mm/hugetlb: Remove pmd_huge_split_prepare Date: Thu, 27 Jul 2017 16:20:25 +0530 [thread overview] Message-ID: <912dcb7d-4dff-979a-3777-2e9e13a7adda@linux.vnet.ibm.com> (raw) In-Reply-To: <20170727083756.32217-3-aneesh.kumar@linux.vnet.ibm.com> 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, "Kirill A . Shutemov" <kirill@shutemov.name> Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 3/3] mm/hugetlb: Remove pmd_huge_split_prepare Date: Thu, 27 Jul 2017 16:20:25 +0530 [thread overview] Message-ID: <912dcb7d-4dff-979a-3777-2e9e13a7adda@linux.vnet.ibm.com> (raw) In-Reply-To: <20170727083756.32217-3-aneesh.kumar@linux.vnet.ibm.com> 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
next prev parent reply other threads:[~2017-07-27 10:50 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-27 8:37 [RFC PATCH 1/3] powerpc/mm: update pmdp_invalidate to return old pmd value Aneesh Kumar K.V 2017-07-27 8:37 ` Aneesh Kumar K.V 2017-07-27 8:37 ` [RFC PATCH 2/3] powerpc/mm: Implement pmdp_establish for ppc64 Aneesh Kumar K.V 2017-07-27 8:37 ` Aneesh Kumar K.V 2017-07-27 12:56 ` Michal Hocko 2017-07-27 12:56 ` Michal Hocko 2017-07-27 15:52 ` Aneesh Kumar K.V 2017-07-27 15:52 ` Aneesh Kumar K.V 2017-07-27 8:37 ` [RFC PATCH 3/3] mm/hugetlb: Remove pmd_huge_split_prepare Aneesh Kumar K.V 2017-07-27 8:37 ` Aneesh Kumar K.V 2017-07-27 10:50 ` Aneesh Kumar K.V [this message] 2017-07-27 10:50 ` Aneesh Kumar K.V 2017-07-27 12:57 ` Michal Hocko 2017-07-27 12:57 ` Michal Hocko 2017-07-27 15:57 ` Aneesh Kumar K.V 2017-07-27 15:57 ` Aneesh Kumar K.V 2017-07-28 7:04 ` Michal Hocko 2017-07-28 7:04 ` Michal Hocko 2017-07-27 12:54 ` [RFC PATCH 1/3] powerpc/mm: update pmdp_invalidate to return old pmd value Michal Hocko 2017-07-27 12:54 ` Michal Hocko 2017-07-27 12:58 ` Kirill A. Shutemov 2017-07-27 12:58 ` Kirill A. Shutemov 2017-07-27 15:48 ` Aneesh Kumar K.V 2017-07-27 15:48 ` Aneesh Kumar K.V 2017-07-28 7:01 ` Michal Hocko 2017-07-28 7:01 ` Michal Hocko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=912dcb7d-4dff-979a-3777-2e9e13a7adda@linux.vnet.ibm.com \ --to=aneesh.kumar@linux.vnet.ibm.com \ --cc=benh@kernel.crashing.org \ --cc=kirill@shutemov.name \ --cc=linux-mm@kvack.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=paulus@samba.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.