Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031729AbbD2JPG (ORCPT ); Wed, 29 Apr 2015 05:15:06 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:58756 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031672AbbD2JO5 (ORCPT ); Wed, 29 Apr 2015 05:14:57 -0400 From: "Aneesh Kumar K.V" To: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins Cc: Dave Hansen , Mel Gorman , Rik van Riel , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Steve Capper , Johannes Weiner , Michal Hocko , Jerome Marchand , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" Subject: Re: [PATCHv5 18/28] x86, thp: remove infrastructure for handling splitting PMDs In-Reply-To: <1429823043-157133-19-git-send-email-kirill.shutemov@linux.intel.com> References: <1429823043-157133-1-git-send-email-kirill.shutemov@linux.intel.com> <1429823043-157133-19-git-send-email-kirill.shutemov@linux.intel.com> User-Agent: Notmuch/0.19+103~g294bb6d (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Apr 2015 14:43:45 +0530 Message-ID: <87d22n8fg6.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042909-0029-0000-0000-000001799B21 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2492 Lines: 70 "Kirill A. Shutemov" writes: > With new refcounting we don't need to mark PMDs splitting. Let's drop > code to handle this. > > Signed-off-by: Kirill A. Shutemov > Tested-by: Sasha Levin > --- > arch/x86/include/asm/pgtable.h | 9 --------- > arch/x86/include/asm/pgtable_types.h | 2 -- > arch/x86/mm/gup.c | 13 +------------ > arch/x86/mm/pgtable.c | 14 -------------- > 4 files changed, 1 insertion(+), 37 deletions(-) > > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h > index f89d6c9943ea..21a2e25a5393 100644 > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -158,11 +158,6 @@ static inline int pmd_large(pmd_t pte) > } > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > -static inline int pmd_trans_splitting(pmd_t pmd) > -{ > - return pmd_val(pmd) & _PAGE_SPLITTING; > -} > - > static inline int pmd_trans_huge(pmd_t pmd) > { > return pmd_val(pmd) & _PAGE_PSE; > @@ -792,10 +787,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma, > unsigned long address, pmd_t *pmdp); > > > -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH > -extern void pmdp_splitting_flush(struct vm_area_struct *vma, > - unsigned long addr, pmd_t *pmdp); > - Can we keep pmdp_splitting_flush or a variant and use that before a hugepage split ? That is to have a special function to do pmd_clear before splitting ?. We still depend on a IPI to be send to other cpus on split and not all archs will do that in pmdp_clear_flush_notify. I guess we need the ipi to make sure a local_irq_disable can prevent a parallel split ? Something like ? diff --git a/mm/huge_memory.c b/mm/huge_memory.c index cce4604c192f..0a0d00b21f76 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2608,7 +2608,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, young = pmd_young(*pmd); /* leave pmd empty until pte is filled */ - pmdp_clear_flush_notify(vma, haddr, pmd); + pmdp_splitting_clear_flush_notify(vma, haddr, pmd); pgtable = pgtable_trans_huge_withdraw(mm, pmd); pmd_populate(mm, &_pmd, pgtable); -aneesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/