Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2208218imm; Thu, 23 Aug 2018 16:33:27 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwiLdnX1My/+gLvlW0TwyM9zi+sA47acjPVsN+oA4trKeHYeq1nmstSqz/SOwlaiQJjf98v X-Received: by 2002:a63:cd4c:: with SMTP id a12-v6mr58208046pgj.15.1535067207873; Thu, 23 Aug 2018 16:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535067207; cv=none; d=google.com; s=arc-20160816; b=MchCt7zOr6H6tSMpQuIuleSo+Q89peH9tMwAZg9YDLMREYLfO40m/WxMWStwkndrPk elenCtfA62iW4sum36dsESKdFdMpnfm7uWTds3ZAGuRMmS69Zuhwegk7tmucqzALOGSk sXNdAgoZAGesIFPn1gVbOEhb/c+bjhHsmKJEbbHZelCzgptJoJbSyP6psiqI381iWL4b itlO9Ly3f42HqU9Ub+BgDZg/BGSLUepcf9tk4srTknEsmfOtPkinfJcfIyg+gviFFW0g 6E00xQ++d4X/D/vOHbh2FvaCNWQ5Pk7aa1hRS3DNwkdIdrG4aD+e410pb8uAl7O37Uo6 Lb6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=58q8HNjYWRDaxMtRFijbjbnPNE6qPHg69UGaIFpBoWM=; b=lW1+ZdiVVP0oUtjWDv2thMt7d6AraEeYXCbo2F0WDnaTn86ibBsIhGte+87S2rfNXA irBq5kEuI+SYOCg1SZMTl13OAZZhwPIzjzEhHvnKkXZ3hbB7dtk0p51BNdCQG35Rcb0K Lvgk98E5JkWXCHwc/Jj1rYkxicTIBmggczQ9J7ZKmdNLfwJSRw5p1pRDHR4in4wc/N1K Y/6u7cmgJZyGF8eLstbivYhbIiE4S1mK+G5MrUfDwhvM3yTWvOK/XuJhTbJD7SsWjAi+ iF04JOcAn949CWWJEyRFLwzybpQO18suYTy8PdU26n36dV/woEwiizPGMidXWiy5dG6u sp0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29-v6si4920223pgi.94.2018.08.23.16.33.12; Thu, 23 Aug 2018 16:33:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbeHXDDp (ORCPT + 99 others); Thu, 23 Aug 2018 23:03:45 -0400 Received: from foss.arm.com ([217.140.101.70]:52010 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbeHXDDo (ORCPT ); Thu, 23 Aug 2018 23:03:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD5727A9; Thu, 23 Aug 2018 16:31:46 -0700 (PDT) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 417213F2EA; Thu, 23 Aug 2018 16:31:45 -0700 (PDT) Date: Fri, 24 Aug 2018 00:31:43 +0100 From: Will Deacon To: Peter Zijlstra Cc: torvalds@linux-foundation.org, luto@kernel.org, x86@kernel.org, bp@alien8.de, riel@surriel.com, jannh@google.com, ascannell@google.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nicholas Piggin , David Miller , Martin Schwidefsky , Michael Ellerman Subject: Re: [PATCH 3/4] mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE Message-ID: <20180823233142.GB4487@brain-police> References: <20180822153012.173508681@infradead.org> <20180822154046.823850812@infradead.org> <20180822155527.GF24124@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180822155527.GF24124@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 22, 2018 at 05:55:27PM +0200, Peter Zijlstra wrote: > On Wed, Aug 22, 2018 at 05:30:15PM +0200, Peter Zijlstra wrote: > > ARM > > which later used this put an explicit TLB invalidate in their > > __p*_free_tlb() functions, and PowerPC-radix followed that example. > > > +/* > > + * If we want tlb_remove_table() to imply TLB invalidates. > > + */ > > +static inline void tlb_table_invalidate(struct mmu_gather *tlb) > > +{ > > +#ifdef CONFIG_HAVE_RCU_TABLE_INVALIDATE > > + /* > > + * Invalidate page-table caches used by hardware walkers. Then we still > > + * need to RCU-sched wait while freeing the pages because software > > + * walkers can still be in-flight. > > + */ > > + __tlb_flush_mmu_tlbonly(tlb); > > +#endif > > +} > > > Nick, Will is already looking at using this to remove the synchronous > invalidation from __p*_free_tlb() for ARM, could you have a look to see > if PowerPC-radix could benefit from that too? > > Basically, using a patch like the below, would give your tlb_flush() > information on if tables were removed or not. Just to say that I have something up and running for arm64 based on this. I'll post it once it's seen a bit more testing (either tomorrow or Monday). Will