From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 09/11] mm,thp: introduce flush_pmd_tlb_range Date: Wed, 16 Sep 2015 15:26:28 -0700 Message-ID: <20150916152628.32073b37c02550557672092c@linux-foundation.org> References: <1440666194-21478-1-git-send-email-vgupta@synopsys.com> <1440666194-21478-10-git-send-email-vgupta@synopsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46281 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752596AbbIPW03 (ORCPT ); Wed, 16 Sep 2015 18:26:29 -0400 In-Reply-To: <1440666194-21478-10-git-send-email-vgupta@synopsys.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Vineet Gupta Cc: "Aneesh Kumar K.V" , "Kirill A. Shutemov" , Mel Gorman , Matthew Wilcox , Minchan Kim , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, arc-linux-dev@synopsys.com On Thu, 27 Aug 2015 14:33:12 +0530 Vineet Gupta wrote: > --- a/mm/pgtable-generic.c > +++ b/mm/pgtable-generic.c > @@ -84,6 +84,19 @@ pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address, > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > > +#ifndef __HAVE_ARCH_FLUSH_PMD_TLB_RANGE > + > +/* > + * ARCHes with special requirements for evicting THP backing TLB entries can > + * implement this. Otherwise also, it can help optimizing thp flush operation. > + * flush_tlb_range() can have optimization to nuke the entire TLB if flush span > + * is greater than a threashhold, which will likely be true for a single > + * huge page. > + * e.g. see arch/arc: flush_pmd_tlb_range > + */ > +#define flush_pmd_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) > +#endif Did you consider using a __weak function here?