[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180926125405.GH2979@brain-police>
Date: Wed, 26 Sep 2018 13:54:06 +0100
From: Will Deacon <will.deacon@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: aneesh.kumar@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
npiggin@...il.com, linux-arch@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux@...linux.org.uk,
heiko.carstens@...ibm.com, riel@...riel.com
Subject: Re: [PATCH 08/18] arm/tlb: Convert to generic mmu_gather
On Wed, Sep 26, 2018 at 01:36:31PM +0200, Peter Zijlstra wrote:
> Generic mmu_gather provides everything that ARM needs:
>
> - range tracking
> - RCU table free
> - VM_EXEC tracking
> - VIPT cache flushing
>
> The one notable curiosity is the 'funny' range tracking for classical
> ARM in __pte_free_tlb().
>
> Cc: Nick Piggin <npiggin@...il.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
> Cc: Will Deacon <will.deacon@....com>
> Cc: Russell King <linux@...linux.org.uk>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> arch/arm/include/asm/tlb.h | 255 ++-------------------------------------------
> 1 file changed, 14 insertions(+), 241 deletions(-)
[...]
> static inline void
> -tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr)
> +__pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr)
> {
> - tlb_add_flush(tlb, addr);
> -}
> -
> -#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
> -#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr)
> -#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
> -
> -#define tlb_migrate_finish(mm) do { } while (0)
> -
> -static inline void tlb_change_page_size(struct mmu_gather *tlb,
> - unsigned int page_size)
> -{
> -}
> -
> -static inline void tlb_flush_remove_tables(struct mm_struct *mm)
> -{
> -}
> +#ifdef CONFIG_ARM_LPAE
> + struct page *page = virt_to_page(pmdp);
>
> -static inline void tlb_flush_remove_tables_local(void *arg)
> -{
> + pgtable_pmd_page_dtor(page);
The dtor() is a NOP for Arm, so I don't think you need too call it (and we
never call the ctor() afaict). I wonder if should be caring about this on
arm64...
Other than that:
Acked-by: Will Deacon <will.deacon@....com>
Will
Powered by blists - more mailing lists