Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2246519rwl; Thu, 6 Apr 2023 07:45:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bHfYxPu1PT1bfDLjaWehTPxXW4UbC3WkUV7WoidpCRD044UH0J9/5/lvYDeLBHMOTl2THQ X-Received: by 2002:a17:906:ce41:b0:944:394:93f7 with SMTP id se1-20020a170906ce4100b00944039493f7mr6378205ejb.61.1680792313520; Thu, 06 Apr 2023 07:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680792313; cv=none; d=google.com; s=arc-20160816; b=zNV+izYLq9qEHrY+wBEU8SY3kWux65134owvN8uG+oiULbCGWKEeIDFJY1/kUumheF mlSkYFjFiNxGTD+kItn/l4VK7+Yz4TXL73XPdSUzYE3ESM94F3P5rk8AFc5fONCqMm6+ YUDAcqKHlXselykFjVd8QDRz05w8X5i4rO4hDFvkm8YVShuNM0Z8PAPCWLY2qnoco4C5 Sudp5AkQIbgRoNw/EPQQDsJlTxXT/BpbG+qx2pEIB2DxDhMICgyiYGu+zLZ9urQ27eFc d0Ui2oL2wL87l0TuK7QUst7YXYjvwk8wK4KGiJqTkZ7SOejs/VJ66KmLY48oNSozhfGF UvsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xC9liSByLfpmJoqxob1Tfe5QJtboRITHVK7L2yzhpb4=; b=Pn/AHnih443N5jO3xGkrrSvqzPBe7zFbYOMvkGbDaI1sRdgGpbWDBhhMRUTgCCU+q/ QgEVArf6/R3j5t8IYaziVNqIXS0g3OudoKUJ+bPSZSwoRVX4BW32s8ymkHq6MwdaZTqs Y8rChnZMPPY47sp38na6BSVJ6XhGnO/4Jx1/9qTl+vnR3Yq+xnVHFyvna5D6iXd0HB/x i5PeiQrFN2KvHnHNWZDHfg7nVpD+VZ6Dl298Xi+wflgWi970w8UUPa5o/5y6RvqdhH3T uxwrVuw8acTj9J+d5k6XtEfd93sTuoDvvYjGApayhdpAv+bAStF6F0e5cJcu4jn7baNz aiag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="rEIkwQ/w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a1709061d1600b00939c395018esi1137253ejh.474.2023.04.06.07.44.47; Thu, 06 Apr 2023 07:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="rEIkwQ/w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238965AbjDFOmJ (ORCPT + 99 others); Thu, 6 Apr 2023 10:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239122AbjDFOlx (ORCPT ); Thu, 6 Apr 2023 10:41:53 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF602E0; Thu, 6 Apr 2023 07:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=xC9liSByLfpmJoqxob1Tfe5QJtboRITHVK7L2yzhpb4=; b=rEIkwQ/wxL0jbUwKNMG+Rh2X7J fhszdLIzSoytlVtA4gcIUYPYI8IA1Jwh6TeTtXAh3APvzGn9QtZ/HqTywulvk4Df4PtnnO40IDaBd 4ZvtlOBF7yGAQPzpfFAmhO5IxmOLDaNwkkrydZ3Gcgl1WF0OUojR7tF3RXOQTtWC4wGL+7WVFfYZn ObQcLHeCK4J039oW17+VXorH+Ez+FqxveiV0q7ZKCMtFodu4+1u0q2K1HssdvPWS4UaLP12oUmZEZ MU7rPLjGwsEoA0GXCU3E/wk0EU3HtN/HGsZIZbNNtQKaCbLvxGCp5vLBqHYTa8Z/UolfGFRVEzFo1 yL+DHjGA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pkQlu-00AY5v-2L; Thu, 06 Apr 2023 14:39:30 +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 9BA2F300338; Thu, 6 Apr 2023 16:39:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7FDF3212E36AE; Thu, 6 Apr 2023 16:39:26 +0200 (CEST) Date: Thu, 6 Apr 2023 16:39:26 +0200 From: Peter Zijlstra To: Valentin Schneider Cc: Frederic Weisbecker , Yair Podemsky , 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, 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, dhildenb@redhat.com, alougovs@redhat.com Subject: Re: [PATCH 3/3] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to CPUs in kernel mode Message-ID: <20230406143926.GP386572@hirez.programming.kicks-ass.net> References: <20230404134224.137038-1-ypodemsk@redhat.com> <20230404134224.137038-4-ypodemsk@redhat.com> <20230405114148.GA351571@hirez.programming.kicks-ass.net> <20230406133805.GO386572@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2023 at 03:11:52PM +0100, Valentin Schneider wrote: > On 06/04/23 15:38, Peter Zijlstra wrote: > > On Wed, Apr 05, 2023 at 01:45:02PM +0100, Valentin Schneider wrote: > >> > >> I've been hacking on something like this (CSD deferral for NOHZ-full), > >> and unfortunately this uses the CPU-local cfd_data storage thing, which > >> means any further smp_call_function() from the same CPU to the same > >> destination will spin on csd_lock_wait(), waiting for the target CPU to > >> come out of userspace and flush the queue - and we've just spent extra > >> effort into *not* disturbing it, so that'll take a while :( > > > > I'm not sure I buy into deferring stuff.. a NOHZ_FULL cpu might 'never' > > come back. Queueing data just in case it does seems wasteful. > > Putting those callbacks straight into the bin would make my life much > easier! Well, it's either they get inhibited at the source like the parent patch does, or they go through. I really don't see a sane middle way here. > Unfortunately, even if they really should, I don't believe all of the > things being crammed onto NOHZ_FULL CPUs have the same definition of > 'never' as we do :/ That's not entirely the point, the point is that there are proper NOHZ_FULL users that won't return to the kernel until the machine shuts down. Buffering stuff for them is more or less a direct memory leak.