Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5616868imm; Mon, 27 Aug 2018 00:48:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZS1dSGKozoyKCrATMqlxAdhtVDcBw5sjt9nj2Q0zxSJ4beAn5iP5BNTzPS+940YydDBJoI X-Received: by 2002:a63:b53:: with SMTP id a19-v6mr11388689pgl.280.1535356138137; Mon, 27 Aug 2018 00:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535356138; cv=none; d=google.com; s=arc-20160816; b=ukTIJBaQnPbi7Csb+0x63RPBoTTgR3Hj/AZP9JQjuAiNUxbxfKltg97PeY5ieSw300 N4wVvDaG+eBjYoU7YELHbVLTBeQnwCxzz7kBJefcfPZLfvcCTgaaRQPDZPTyGvT3Fddv f3jhL6N8SEwwTZ4MwnDY+hal49jmovI1ioOwgP94ZK5R1ACrjL8/STOyhyPoxyes2BBS 2HadsfjyaeKk2tPFf4BpF+izguccnmaZbNCb7m5LownxAEZjO5JQPSWXQiXq6LKRbTEG b/a4dm8VBFcMgM2z7Z4f1ck0INTBH7mYIoUGThbPly1oIQ8HX/uAsuh8U8ocaB8Gkb46 mj3g== 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=ubZJ6NAXPWLoHzvy1jvSHb6b1V5y4RgVUcmImksJcMc=; b=WpRfCCgfxLY2yxPZgAh35iRBtDnyXE3XQPGxHqB1gOT8ouNy44vRwB6BoUXU6ndcT2 3TzuXwzLz/Ul/pCT7EB8mPRQrjVqn2vgP1Y2gQteZCcQFjnrgBeYMLPzSt2k0SCzvoOM oDNrXoDlNdhVdy8wi8eyX4Xz4LSyFMsNQfmvjdwKw1lXpqmvg0N7xa6AcabHp9m1yhOp OU5e+25gJaDUaZxp2Rj6g91h6KU7fMPa4+3dFO/X6SUkCigzRHPGOeL2wFtLNOw0fn0j 8cZIW3bg+vn4xv13SRh8LqYwPILXnYTPY0K91+zduBE/xfe73jZjhgh2xRlaignbKiyg kyYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=xfsBp42o; 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 z4-v6si13590835pge.23.2018.08.27.00.48.42; Mon, 27 Aug 2018 00:48:58 -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=merlin.20170209 header.b=xfsBp42o; 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 S1727291AbeH0Lc6 (ORCPT + 99 others); Mon, 27 Aug 2018 07:32:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58764 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbeH0Lc6 (ORCPT ); Mon, 27 Aug 2018 07:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=ubZJ6NAXPWLoHzvy1jvSHb6b1V5y4RgVUcmImksJcMc=; b=xfsBp42o4Ga3ZzIw8vnEQWKdV FINUCfu8bru0CB4eZr1BzMHDRRZwbC9ssqg0ywtTy9KL+wGrFp93m7WabKeC1RyRhlqm0/kgVK6ED G1/58i13QQMBRobQbKW/cRCZL1B+UGGkFqALHenhusoVqHOxaqFrVtYUjT2CXqAPcz8zRG1HwjInA w1xNuiImYxOEfB+kOMVAMoKWUSnce6H2+MojV9ylPJs+qd57CoNLERkFgQky7gST4PFoRzP+RVg8w 8HnBpLeC2hojcgOU8Tdxx8UBkSxoJ8bpuz4A531R26AqXfmQ9xz7NaR2rH07V+ueYjbTcLMIDBC94 F+/o/2t+Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuCEo-0000Y2-U2; Mon, 27 Aug 2018 07:47:03 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8A7E32024EB1D; Mon, 27 Aug 2018 09:47:01 +0200 (CEST) Date: Mon, 27 Aug 2018 09:47:01 +0200 From: Peter Zijlstra To: Nicholas Piggin Cc: Will Deacon , Linus Torvalds , Benjamin Herrenschmidt , Andrew Lutomirski , the arch/x86 maintainers , Borislav Petkov , 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: <20180827074701.GW24124@hirez.programming.kicks-ass.net> References: <20180822155527.GF24124@hirez.programming.kicks-ass.net> <20180823134525.5f12b0d3@roar.ozlabs.ibm.com> <776104d4c8e4fc680004d69e3a4c2594b638b6d1.camel@au1.ibm.com> <20180823133958.GA1496@brain-police> <20180824084717.GK24124@hirez.programming.kicks-ass.net> <20180824113214.GK24142@hirez.programming.kicks-ass.net> <20180824113953.GL24142@hirez.programming.kicks-ass.net> <20180827150008.13bce08f@roar.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180827150008.13bce08f@roar.ozlabs.ibm.com> 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 Mon, Aug 27, 2018 at 03:00:08PM +1000, Nicholas Piggin wrote: > On Fri, 24 Aug 2018 13:39:53 +0200 > Peter Zijlstra wrote: > > On Fri, Aug 24, 2018 at 01:32:14PM +0200, Peter Zijlstra wrote: > > > Hurm.. look at commit: > > > > > > e77b0852b551 ("mm/mmu_gather: track page size with mmu gather and force flush if page size change") > > > > Ah, good, it seems that already got cleaned up a lot. But it all moved > > into the power code.. blergh. > > I lost track of what the problem is here? Aside from the commit above being absolute crap (which did get fixed up, luckily) I would really like to get rid of all arch specific mmu_gather. We can have opt-in bits to the generic code, but the endless back and forth between common and arch code is an utter pain in the arse. And there's only like 4 architectures that still have a custom mmu_gather: - sh - arm - ia64 - s390 sh is trivial, arm seems doable, with a bit of luck we can do 'rm -rf arch/ia64' leaving us with s390. After that everyone uses the common code and we can clean up. > For powerpc, tlb_start_vma is not the right API to use for this because > it wants to deal with different page sizes within a vma. Yes.. I see that. tlb_remove_check_page_size_change() really is a rather ugly thing, it can cause loads of TLB flushes. Do you really _have_ to do that? The way ARM and x86 work is that using INVLPG in a 4K stride is still correct for huge pages, inefficient maybe, but so is flushing every other page because 'sparse' transparant-huge-pages.