From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f200.google.com (mail-io0-f200.google.com [209.85.223.200]) by kanga.kvack.org (Postfix) with ESMTP id EE22C6B0005 for ; Thu, 14 Jun 2018 02:16:00 -0400 (EDT) Received: by mail-io0-f200.google.com with SMTP id r16-v6so4058694ioj.2 for ; Wed, 13 Jun 2018 23:16:00 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 189-v6sor2209268itm.49.2018.06.13.23.15.59 for (Google Transport Security); Wed, 13 Jun 2018 23:15:59 -0700 (PDT) MIME-Version: 1.0 References: <20180612071621.26775-1-npiggin@gmail.com> <20180612071621.26775-4-npiggin@gmail.com> <20180613083131.139a3c34@roar.ozlabs.ibm.com> <20180613090950.50566245@roar.ozlabs.ibm.com> <20180613101241.004fd64e@roar.ozlabs.ibm.com> <20180614124931.703e5b54@roar.ozlabs.ibm.com> In-Reply-To: <20180614124931.703e5b54@roar.ozlabs.ibm.com> From: Linus Torvalds Date: Thu, 14 Jun 2018 15:15:47 +0900 Message-ID: Subject: Re: [RFC PATCH 3/3] powerpc/64s/radix: optimise TLB flush with precise TLB ranges in mmu_gather Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Nick Piggin Cc: linux-mm , ppc-dev , linux-arch , "Aneesh Kumar K. V" , Minchan Kim , Mel Gorman , Nadav Amit , Andrew Morton On Thu, Jun 14, 2018 at 11:49 AM Nicholas Piggin wrote: > > +#ifndef pte_free_tlb > #define pte_free_tlb(tlb, ptep, address) \ > do { \ > __tlb_adjust_range(tlb, address, PAGE_SIZE); \ > __pte_free_tlb(tlb, ptep, address); \ > } while (0) > +#endif Do you really want to / need to take over the whole pte_free_tlb macro? I was hoping that you'd just replace the __tlv_adjust_range() instead. Something like - replace the __tlb_adjust_range(tlb, address, PAGE_SIZE); with a "page directory" version: __tlb_free_directory(tlb, address, size); - have the default implementation for that be the old code: #ifndef __tlb_free_directory #define __tlb_free_directory(tlb,addr,size) __tlb_adjust_range(tlb, addr, PAGE_SIZE) #endif and that way architectures can now just hook into that "__tlb_free_directory()" thing. Hmm? Linus