Re: [PATCH 09/11] mm,thp: introduce flush_pmd_tlb_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 16 September 2015 03:26 PM, Andrew Morton wrote:
> On Thu, 27 Aug 2015 14:33:12 +0530 Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> 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?

IMHO weak doesn't apply here. All arches already have flush_tlb_range() which is
called by normal and THP code to flush the corresponding normal/THP page TLB
entry. What I want to do is differentiate the THP page flush case - bu calling a
different API (which can be optionally implemented by arch or fall back to vanilla
flush_tlb_page()). So we need to change the call itself here while weak lends
itself better to keeping the call same but just swapping the implementation.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]