Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2903940imm; Fri, 24 Aug 2018 07:19:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaBc1DCsNhX8IKKvJK/QFD2bNOWqTDe+lt4W1kml+kMTMG/LJv+2/uUiSq8sg2x7kAeWrKc X-Received: by 2002:a63:9712:: with SMTP id n18-v6mr1962169pge.292.1535120374556; Fri, 24 Aug 2018 07:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535120374; cv=none; d=google.com; s=arc-20160816; b=BpAs7LgtjN64n7u2yRAWq6aESoK08JQKIWgnh+9APpt2HSCWiArXu4B0mpOBchPl7J ReM51wMujJkqq4HZ6t7WfEe9YgFV1d5kwLRbRjtbMST+WWTOWojzLEti1OsXNtm0lbQV 6CfUA/53oItir3LctBCMlxlTa8aRolAZ3IUmZRIpHGnuAFB+GxzWcYgROSAys1R+csNc ytlO74tPbiLTNBdf6twsFqY44Ff60Bf+b3o/uDG9z7LamYbkeaq7/ys8vmJZJFQVxNpV uvClCOL/PoN3pXhV0z+FAOjTX/HYcVC7rhTNOHD9S/NP2KZUsZqCA2CHnYujivHSz9dt UoCQ== 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:dkim-signature:arc-authentication-results; bh=vn2Bqi4GG9KMF7nFNidt/f60bbuDI8qY8gVrl8Bv9Aw=; b=Q4U75b/c/Gkvtr6qcKnZiY3kqmjV1w7GZo/yk6+xgADL7AViqSDo6zOXz0Hh/SFPuq Quetp5omIXiGjVZ2blGlH097y/i57kJQcPgvuSIJ+q2sln0raXk4kZeY/TZn9Vqs00qV /biAuhrNTm6e09NtDHTsqeMDBO0iuKhthGwvLHi5idj2fzfJrZa9EYvwars7xMAsq0/g cpF+s9EzCv1LjU4CndI5zgpn6U0rELSaui4i6c0Q9oaUePKsOp7gP1AqVfcEltfzSFZi bPVnlnoMkwH+4OtYxlZB1gJV0Yu3YEAS3Dai+mTrGYM46HUVZ6wTxjs2wywSwWsiZ2VZ XMqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=n0ywQZz1; 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 z137-v6si7091548pgz.370.2018.08.24.07.19.18; Fri, 24 Aug 2018 07:19:34 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=n0ywQZz1; 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 S1726535AbeHXRw4 (ORCPT + 99 others); Fri, 24 Aug 2018 13:52:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44566 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbeHXRwz (ORCPT ); Fri, 24 Aug 2018 13:52:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vn2Bqi4GG9KMF7nFNidt/f60bbuDI8qY8gVrl8Bv9Aw=; b=n0ywQZz1hNZYyiCfiOOmv6Dwi hAaEYm6uPtUL6CAtBPa0SUxbFR48W8vQCXMxsRN5cvv9E6xp0miyz6h0qeIE8hDRbjUqOr52lPmVJ oQq2hTL4fh+TK/LANhvYHbrAwQgtYiTffyGE4GN01ZqtCzLcMbQpoC8VGlrCEqgRLrz08eX8VjkIM 7DAa79MK+AEjm+Y856ng/xT5xIqXGwbmcDT2WgTwkCKNwyVb1kNxbIfTl3H+3lLP5YDFHl4gs9glb R2XKwy9vo4+9rxfpDbmZQmwkMUNrm9eG9l2cWb85uIVx0LnlIWLSWMYjXamWHtdiM3PNWLIQV90Xm ZTe6UZ1Tw==; Received: from [24.132.217.100] (helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftBxs-0006Ds-KN; Fri, 24 Aug 2018 13:18:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D740D2024C922; Fri, 24 Aug 2018 15:14:40 +0200 (CEST) Date: Fri, 24 Aug 2018 15:14:40 +0200 From: Peter Zijlstra To: Benjamin Herrenschmidt Cc: Linus Torvalds , Nick Piggin , Andrew Lutomirski , the arch/x86 maintainers , Borislav Petkov , Will Deacon , Rik van Riel , Jann Horn , Adin Scannell , Dave Hansen , Linux Kernel Mailing List , linux-mm , 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: <20180824131440.GN24142@hirez.programming.kicks-ass.net> References: <20180822153012.173508681@infradead.org> <20180822154046.823850812@infradead.org> <20180822155527.GF24124@hirez.programming.kicks-ass.net> <20180823134525.5f12b0d3@roar.ozlabs.ibm.com> <776104d4c8e4fc680004d69e3a4c2594b638b6d1.camel@au1.ibm.com> <20180824083556.GI24124@hirez.programming.kicks-ass.net> <20180824131332.GM24142@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180824131332.GM24142@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 24, 2018 at 03:13:32PM +0200, Peter Zijlstra wrote: > + * HAVE_RCU_TABLE_FREE > + * > + * This provides tlb_remove_table(), to be used instead of tlb_remove_page() > + * for page directores (__p*_free_tlb()). This provides separate freeing of > + * the page-table pages themselves in a semi-RCU fashion (see comment below). > + * Useful if your architecture doesn't use IPIs for remote TLB invalidates > + * and therefore doesn't naturally serialize with software page-table walkers. > + * > + * HAVE_RCU_TABLE_INVALIDATE > + * > + * This makes HAVE_RCU_TABLE_FREE call tlb_flush_mmu_tlbonly() before freeing > + * the page-table pages. Required if you use HAVE_RCU_TABLE_FREE and your > + * architecture uses the Linux page-tables natively. Writing that also made me think we maybe should've negated that option.