Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2405574rwb; Thu, 29 Sep 2022 09:47:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7J1rAK2xhksosKb+kSrmZM2TgWO9Ee+OeqvPPXRF1xCm9SrmvXcv3cNVGWqTMG0fyYLfVQ X-Received: by 2002:a17:907:6ea4:b0:782:b261:e9ec with SMTP id sh36-20020a1709076ea400b00782b261e9ecmr3441176ejc.287.1664470029512; Thu, 29 Sep 2022 09:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664470029; cv=none; d=google.com; s=arc-20160816; b=OG+peYpr4rjSJUvyl9Kbt6Ur/PadnwledHG6B6eZS23FIRsMdksNdnv6hgApyACARs SuCTvQRfGzDq3E7jMloCxEjQ/l+pYY5ECvb3FmP5Sc8wHtqOye23mzHqRo9tbMEqigWE TlVcN3NZmsRNXME1qIg8wt5RhQkHAOLNeNcYuNr9qT7/9alUMlmM7PaTeqR2RnTz5JtB 4Xsnq9FKDhB2ODE882u0Y/bC2d6U34ecQ3/RinKVMDyWgayEl9WDNKneItiLqkHhc9zG Q5BhGyloYHAvfKU9GIg648LMzPDcO4hSzgHGTB2+gZcMAivvoH3QiT0D13j/mkEAo4/u owuQ== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=cHO0qIOn0soembiQZ/7hdNjz6has1ea6hHTEQnHEID0=; b=G7QaHHqpW5mtIpxWvfMFrEKRpz6R2n+M9MmC9tBaNiphK4I1zh31DPmaLGOeroxzGE PA5VhS9rrA7VyiDkjEpGtzJ7D0luDMU7nTSc3cQ/TQ05V9Ln/02283VAaKQ0l1J6vEix vhwc3iIYIk5unCr8Td03pJRAVePEM/XMgCqksw2Fpx8rBE9nwQTJkaAkHYhm3myJuE3k 0ZyVrsimXDh/YcUXkl63WnUQAqCSP8PMkUyv9Qlyo7MY3afsw9HSf3TpFUYknWPouZ0T FNoGySz/fbOslx6c8+9ouDjL4yL0z3OEfDv7BcKxnFhOy6LFRsPFhw9d1H24co27R3AQ bgEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Un/AED6A"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz6-20020a1709072ce600b007123952b00dsi7940973ejc.100.2022.09.29.09.46.42; Thu, 29 Sep 2022 09:47:09 -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=@kernel.org header.s=k20201202 header.b="Un/AED6A"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235336AbiI2QmJ (ORCPT + 99 others); Thu, 29 Sep 2022 12:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235195AbiI2QmH (ORCPT ); Thu, 29 Sep 2022 12:42:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDAEE153A76 for ; Thu, 29 Sep 2022 09:42:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A33A161F4D for ; Thu, 29 Sep 2022 16:42:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06195C433D7; Thu, 29 Sep 2022 16:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664469725; bh=9+JAay2KY6j6xm1jASu1ajjNIWxzcizOC1IRSt6Lr+Y=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Un/AED6AS11i7tJgaB2hRtq4bt2ttc7YmkXy57jcqWCA1uV4rMPOWSciZAeAyNXIR 0nz+5eVcKiMN2XHms0qyPGb5SZCt3HGYk3ynmKTf2qsc9LVGaKKud05B0jkF/frF08 okkzUArojzYLNOxi3ddsupQ0KThZuXEmp7lxm7lMDXCZskKIKqBm0ranYwFelCpjCU KH7zPjpUdS+uzJAs/H4JzOh6CqCBK7VNmzj6sDmRvRiNfUReZohf0Kg0NKa02AWS7T +oneqFjfktsaFdP4MsZs/yw4ejUtgFJX0K399pdWWOw9KDJi/o2BbpiG2ZUjec70Aa yS7ixL17aHbJg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 9B7E15C0BCA; Thu, 29 Sep 2022 09:42:04 -0700 (PDT) Date: Thu, 29 Sep 2022 09:42:04 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Joel Fernandes , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org, Boqun Feng , "Rafael J. Wysocki" Subject: Re: RCU vs NOHZ Message-ID: <20220929164204.GO4196@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220915191427.GC246308@paulmck-ThinkPad-P17-Gen-1> <20220916075817.GE246308@paulmck-ThinkPad-P17-Gen-1> <20220917142508.GF246308@paulmck-ThinkPad-P17-Gen-1> <20220929152044.GE4196@paulmck-ThinkPad-P17-Gen-1> <20220929154618.GA2864141@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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, Sep 29, 2022 at 06:23:16PM +0200, Peter Zijlstra wrote: > On Thu, Sep 29, 2022 at 08:46:18AM -0700, Paul E. McKenney wrote: > > On Thu, Sep 29, 2022 at 08:20:44AM -0700, Paul E. McKenney wrote: > > > > > > There is a directly invoked RCU hook for any transition that enables or > > > > > disables the tick, namely the ct_*_enter() and ct_*_exit() functions, > > > > > that is, those functions formerly known as rcu_*_enter() and rcu_*_exit(). > > > > > > > > Context tracking doesn't know about NOHZ, therefore RCU can't either. > > > > Context tracking knows about IDLE, but not all IDLE is NOHZ-IDLE. > > > > > > > > Specifically we have: > > > > > > > > ct_{idle,irq,nmi,user,kernel}_enter() > > > > > > > > And none of them are related to NOHZ in the slightest. So no, RCU does > > > > not have a NOHZ callback. > > > > > > > > I'm still thikning you're conflating NOHZ_FULL (stopping the tick when > > > > in userspace) and regular NOHZ (stopping the tick when idle). > > > > Exactly how are ct_user_enter() and ct_user_exit() completely unrelated > > to nohz_full CPUs? > > That's the thing; I'm not talking about nohz_full. I'm talking about > regular nohz. World of difference there. And indeed, for !nohz_full CPUs, the tick continues throughout userspace execution. But you really did have ct_user_enter() and ct_user_exit() on your list. And for idle (as opposed to nohz_full userspace execution), there is still ct_{idle,irq,nmi}_enter(). And RCU does pay attention to these. So exactly what are you trying to tell me here? ;-) > nohz_full is a gimmick that shouldn't be used outside of very specific > cases. Regular nohz otoh is used by everybody always. I will let you take that up with the people using it. Thanx, Paul