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 73B8AC6FD1D for ; Tue, 4 Apr 2023 14:58:56 +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=prN767ZVBOK4g6z4k1DKDILewiBwdrXX+VTFrXyQ5Ow=; b=nLd/K1i7M24QqO pbHYgygo0gnY/QQhbdKpUye7gCzbcY+5xf+bgn3oRXtDAahugRnfA7Nd1SFX/qvLwrarRberSinW4 QME8QDl5DWSsSod+XbUzsg0rVkN04winoQfwfrXlvWxCCda5kMirqtl2Lvvy2L4/CKu/v20AGpsF1 YS2CDoGN15B9VypFTtPGo/p2oVR+dVakwatOo/vo1Vq9t2lfIZpw7/yOwJDIwbaUVd5G3L/5YPXJp vkmM6ok0+8Lmx1eJ348N/vkSCAY4ZNXRvWd7fOnG7IYdOmONA8xFuHm+3uejySSBK5ckIEIGoxc27 eb+LJbDTkrjzpCP/CL3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pji6o-001uOU-2s; Tue, 04 Apr 2023 14:58:06 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pji6n-001uNE-38 for linux-arm-kernel@bombadil.infradead.org; Tue, 04 Apr 2023 14:58:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=KBh4rzbfHfMkMMlE9cw+MqyUsj44Di5Ker7OlwFYGXg=; b=FmENSU8DdsJwRKLNIy11pT5rwr gZFbISKwxtxGEbpRDZI+PdPBb8ubt+23BYYSER2yHfUnSI2zgXRlA/A9liB6dhfL6rTy6LYIMRvQm gyR6cAIG2mB+TC5hkfYw1+vYNcbuY++BpvLFCCjlbeWJmHkcNxGqSYl+N/wcgrOkou9YFrZd67E9m w2uM4nUqUiAoo0Tu2WJytt+fQkxTpy55fgWCKZrUonHITpNDOnhhCxIBg+tWp3ViIM8YS9U4v2tUE 9jirZfuWp7fZAvU8W0ipyUy++FGIYwgfKD5XO1ksJowLv7OYriDmtjptXbGAC0187adFlCZx+HUPA RAWV4RFA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pji6d-00FSN3-3U; Tue, 04 Apr 2023 14:57:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7720D30003A; Tue, 4 Apr 2023 16:57:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5C05626442AC2; Tue, 4 Apr 2023 16:57:51 +0200 (CEST) Date: Tue, 4 Apr 2023 16:57:51 +0200 From: Peter Zijlstra To: Yair Podemsky Cc: linux@armlinux.org.uk, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, will@kernel.org, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, arnd@arndb.de, keescook@chromium.org, paulmck@kernel.org, jpoimboe@kernel.org, samitolvanen@google.com, frederic@kernel.org, ardb@kernel.org, juerg.haefliger@canonical.com, rmk+kernel@armlinux.org.uk, geert+renesas@glider.be, tony@atomide.com, linus.walleij@linaro.org, sebastian.reichel@collabora.com, nick.hawkins@hpe.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, mtosatti@redhat.com, vschneid@redhat.com, dhildenb@redhat.com, alougovs@redhat.com Subject: Re: [PATCH 2/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs Message-ID: <20230404145751.GA297936@hirez.programming.kicks-ass.net> References: <20230404134224.137038-1-ypodemsk@redhat.com> <20230404134224.137038-3-ypodemsk@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230404134224.137038-3-ypodemsk@redhat.com> 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, Apr 04, 2023 at 04:42:23PM +0300, Yair Podemsky wrote: > diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c > index 2b93cf6ac9ae..5ea9be6fb87c 100644 > --- a/mm/mmu_gather.c > +++ b/mm/mmu_gather.c > @@ -191,7 +191,13 @@ static void tlb_remove_table_smp_sync(void *arg) > /* Simply deliver the interrupt */ > } > > -void tlb_remove_table_sync_one(void) > +#ifdef CONFIG_ARCH_HAS_CPUMASK_BITS > +#define REMOVE_TABLE_IPI_MASK mm_cpumask(mm) > +#else > +#define REMOVE_TABLE_IPI_MASK NULL > +#endif /* CONFIG_ARCH_HAS_CPUMASK_BITS */ > + > +void tlb_remove_table_sync_one(struct mm_struct *mm) > { > /* > * This isn't an RCU grace period and hence the page-tables cannot be > @@ -200,7 +206,8 @@ void tlb_remove_table_sync_one(void) > * It is however sufficient for software page-table walkers that rely on > * IRQ disabling. > */ > - smp_call_function(tlb_remove_table_smp_sync, NULL, 1); > + on_each_cpu_mask(REMOVE_TABLE_IPI_MASK, tlb_remove_table_smp_sync, > + NULL, true); > } Uhh, I don't think NULL is a valid @mask argument. Should that not be something like: #ifdef CONFIG_ARCH_HAS_CPUMASK #define REMOVE_TABLE_IPI_MASK mm_cpumask(mm) #else #define REMOVE_TABLE_IPI_MASK cpu_online_mask #endif preempt_disable(); on_each_cpu_mask(REMOVE_TABLE_IPI_MASK, tlb_remove_table_smp_sync, NULL true); preempt_enable(); ? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel