From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73DBFC77B7A for ; Tue, 16 May 2023 08:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T4ImlIYa3vMszyxhKKoKLTbK1z7P8l3vbkpFEmX8d5M=; b=nd83IkE3CORo29 jlT1bkh3y0lpW6LyMejBxZN64I12H237HBLfu8KCePf3WSwT+wd3hK2NkYk899X0hGyA1aDrpjNsI 593rbPQmSA5wOzmm8Q3OF/P4/s7ma4enwgukwggNWBdUJGzfJfo2linObbAQZKysoRjGDRr8aDgho sj1WJ5VBj+Qu7bROyGYy18pc8xsknFT8Y9QnqeHed2SOfUMt8QebqCurGEHLuoySLOJo5kiPjzpnH WgdyQEpQsCCAYOI4M5SYutJZlcyFzei3fFDr4uR4GniPIQXohKnjJhVqE0LKaua0WmZAYgcg+J/rK vM+EtOoPQtWblZ+GL07A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pypw2-004pWa-2Q; Tue, 16 May 2023 08:21:30 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pypvz-004pVF-1l for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 08:21:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=R2GXU7JlKwAojJazccAAXFQzWESiT3QhiSirlHSzbD0=; b=uKE8c0A5rCP/zYqENhnBKV8G+X e5yjrlhqkPhdZR9YJC8uwcHRtqn8hn64Ode2oYbHTMsg1cKPsVlWVMm926S06+VnYqbSZyKzRHZAZ Db8qF7+vS1N77ma2Q6SPdgJG1w/LdOMUviGRRj27azbXZbMkOdKVBTDATbMMJcBsd42nXARB3Un43 d4VpDWUBONACA3CCEl70nnYkCJnIeetMz8/uyCCb+kT/bk6Sx5wJvK6WbxTZoY3HMTTju/mB6+otl Xh+wk131sC//YBvWJw/2FQOyc28k2XGaDwr0WKEQQKEMXzZsP7kHDRyctpNYc0ZbRGWTvb+S94Tm0 irB+FBUw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:52892) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pypvu-0005M3-Dt; Tue, 16 May 2023 09:21:22 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pypvt-0000e8-NW; Tue, 16 May 2023 09:21:21 +0100 Date: Tue, 16 May 2023 09:21:21 +0100 From: "Russell King (Oracle)" To: Thomas Gleixner Cc: Andrew Morton , linux-mm@kvack.org, Christoph Hellwig , Uladzislau Rezki , Lorenzo Stoakes , Peter Zijlstra , Baoquan He , John Ogness , linux-arm-kernel@lists.infradead.org, Mark Rutland , Marc Zyngier , x86@kernel.org Subject: Re: Excessive TLB flush ranges Message-ID: References: <87a5y5a6kj.ffs@tglx> <87353x9y3l.ffs@tglx> <87zg658fla.ffs@tglx> <87r0rg93z5.ffs@tglx> <87ilcs8zab.ffs@tglx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ilcs8zab.ffs@tglx> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_012127_585671_1A351B9F X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 16, 2023 at 10:18:36AM +0200, Thomas Gleixner wrote: > On Tue, May 16 2023 at 08:37, Thomas Gleixner wrote: > > On Mon, May 15 2023 at 22:31, Russell King wrote: > >>> + list_for_each_entry(va, list, list) { > >>> + /* flush range by one by one 'invlpg' */ > >>> + for (addr = va->va_start; addr < va->va_end; addr += PAGE_SIZE) > >>> + flush_tlb_one_kernel(addr); > >> > >> Isn't this just the same as: > >> flush_tlb_kernel_range(va->va_start, va->va_end); > > > > Indeed. > > Actually not. At least not on x86 where it'd end up with 3 IPIs for that > case again, instead of having one which walks the list on each CPU. So what the best thing to do here is up to the arch implementation. Maybe generic code shouldn't be making the decision here about whether to call flush_tlb_one_kernel() or flush_tlb_kernel_range(). -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel