Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1220801imm; Wed, 22 Aug 2018 22:24:14 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdby4C3jghH43somph9FPFQQ+mFojmCwlvXYVGatuaM0exfsp3dRItW6BNisVHqojWn1vLSR X-Received: by 2002:a63:4a09:: with SMTP id x9-v6mr4454872pga.34.1535001854825; Wed, 22 Aug 2018 22:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535001854; cv=none; d=google.com; s=arc-20160816; b=XY7qxfBlmnIYRjSf0r/t4T6eMXyZJrlqdfMrdcq9KzEijozZEqTIHMfJ1nDmwdvUIZ 6gKN7pcbRuP5Kkqf1Q5uJCLhNKEXjKIJ5kNes6ndtB6fgbiC+F5ZPti8fRBko6F3QgPk hON19ovGINeVb4gN2He8rOuBB/q9Lql2C6d5zS6TaumV5amASbjW37w38jqDxWi+RDeb Ibtf9FxXQvS+KuyOlgrWIqEXZMr5Ymg/pt6Ro/yIyDJUResk3lakjPGeHkUdBz9wpmAR htxAvN36qNlgg4Au+Jy6j7Eidk4XN9IUAoBZhuiKp8KxHTmzhDu25pi43tDuNfhpMMVx FtKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=m36TC93We2a0vA9LajGcMoI/bQ29uBh5ICQRgB6no/c=; b=ZGifyxPKqscEC8y7EHpxGw0JU1/Onrkp2vvfeno3EJXa97g3tsfP4uYKCNrDF/Rtof LRiZ0DUiS8Pzxgyv6bmTzLSPMDjGCa74FLONym5LyzWbf4Sad4zWiSb7/8iOUKyi39DK lMDHeGBi7PJkbAUojYi7G7UKkX/wWoNsko4NkqtcVt6wlCbF8K6eHzRoInaAnsCJ6y2N IXPxOVBvaQh7D/2c3oMLmNuVkVBvgk/IsRpGAx4Nm+jG89NuJSr/LJqhQAXBy5COxJBI wNmGgik/Hi3ck4igAlsR8ITdyeqUs1kSesIFf82SPl9lbiqcqyrgH8gjrCiMP1XXKkmF 4gbQ== 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 i11-v6si3502359pgm.521.2018.08.22.22.23.59; Wed, 22 Aug 2018 22:24:14 -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 S1728522AbeHWIut (ORCPT + 99 others); Thu, 23 Aug 2018 04:50:49 -0400 Received: from gate.crashing.org ([63.228.1.57]:45428 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728360AbeHWIut (ORCPT ); Thu, 23 Aug 2018 04:50:49 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w7N5LUBm017882; Thu, 23 Aug 2018 00:21:32 -0500 Message-ID: <457fb409b4dcd213e2f162792e79e31c09cd55a4.camel@kernel.crashing.org> Subject: Re: [PATCH 3/4] mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE From: Benjamin Herrenschmidt To: Linus Torvalds Cc: Nick Piggin , Peter Zijlstra , 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 Date: Thu, 23 Aug 2018 15:21:30 +1000 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-08-22 at 22:11 -0700, Linus Torvalds wrote: > On Wed, Aug 22, 2018 at 9:54 PM Benjamin Herrenschmidt wrote: > > > > > > So we do need a different flush instruction for the page tables vs. the > > normal TLB pages. > > Right. ARM wants it too. x86 is odd in that a regular "invlpg" already > invalidates all the internal tlb cache nodes. > > So the "new world order" is exactly that patch that PeterZ sent you, that adds a > > + unsigned int freed_tables : 1; > .../... > So instead, when you get to the actual "tlb_flush(tlb)", you do > exactly that - flush the tlb. And the mmu_gather structure shows you > how much you need to flush. If you see that "freed_tables" is set, > then you know that you need to also do the special instruction to > flush the inner level caches. The range continues to show the page > range. Yup. That looks like a generic version of the "need_flush_all" flag we have, which is fine by us. Just don't blame powerpc for all the historical crap :-) Cheers, Ben. > > Linus