Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp17301lqo; Tue, 7 May 2024 10:45:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8HKwmNtK4SNxBGl6o1FSrpd+fwLXtyw7400rsMyUNONTihtMLm+zeGaTLFTL8/xzpQrRg97y35mFFpICKIk0HHGibwcFqvIxJpsO0dw== X-Google-Smtp-Source: AGHT+IGXNfGNep6LYXm/MtrYLvvsTw434KTojUb8l67UAQhjK49Zq8PuH5PhXZdmaWmjOHz2ycUX X-Received: by 2002:a17:903:2444:b0:1eb:3df4:e63b with SMTP id d9443c01a7336-1eeb01837b1mr4915965ad.7.1715103900772; Tue, 07 May 2024 10:45:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715103900; cv=pass; d=google.com; s=arc-20160816; b=IPzYF78tWvwEvP+X1yfcSDIizY0sVW3Nut4YoGR+nkobHpqgYZblZhVQKDbWZU2ms7 m5o+OOsIn3vaoVjWW2mR5eTOWm+b6VefjuedPD39UgxC+qrWo/1XBINxl5i8anubSzk7 1b+Y+odURZ5BU7daHnWeXwdHLzsGD78OF82sgpm2lb/Fc9xt3aaj6ECRoRxKLv6L7wJa 8lvNv5A+QwBPZev2LAkckQnWcdP8sjhTOiFXeVUp0owxqIL2wo97D8eZI65b1QOIBad1 3FO403cqHwi2F+irE64dGbYOLhQ8rL03GU1KoAPfsIWnBegr4EEhsRxQQTwK+Us/uy2b fJQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=B6gQcidDWwxlgWLmykGoB+rqXpGGNJWD/e+x0kK+28o=; fh=++TvLIIunXeFddsiQT+evAaY8QhXyOG9A7zbM0Ilm08=; b=hQbzstlHKO7qZCk+PNQj4nbmozpycKx8Uwh9pnGc8BDrKl1ZqWa9udDPHOJWcqw1up 9UUspnCr6eHVclwdTUFdNYAagkSaLeRC6RfZ4Ix1pNx5jETlCxZ4CGv+fpXo0TpVywTM mQVdwIV/onImiEDdkUVhPSWyCL+NE+JnpPtmnKVjolJH9quL9HV4Voj7T9J9olbCAbmv Uo+ZL9bZxjRs3gw1RJTHf+P4bkkOD0FxfDTDuylbQs4S+BPDSLnBi/Dna6XFUHUQrzXc jZMOQSq6PLov1lEdF83w22YxVYTmRHNqpt5tb6HKMvDvQwio2Ol6D9spTU1s/H36u2c9 OWWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MIYAp7G/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lq14-20020a170903144e00b001ec7a3ca126si10561105plb.637.2024.05.07.10.45.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 10:45:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MIYAp7G/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 61FC8B2641B for ; Tue, 7 May 2024 17:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BDBD15E5D4; Tue, 7 May 2024 17:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MIYAp7G/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24AEA160865; Tue, 7 May 2024 17:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102049; cv=none; b=BxUEPw6svhyiHIEoQ8q2lCa7PpAlP50sc8Gwc3Soe0vumaHQmOLu0GdDTnGc+M5UnyYvbCUS3N0OWqJbkwfrsJ8ft0j+DuTcThHpPUVQQwKeBdgRuNNGjI/7lSIDspsiMMNlUYBHnrP5IiuauAgT1GC9r1ICzWZT0Wr7XQ9wF58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102049; c=relaxed/simple; bh=lmbWOT7TNgeizDvMTV/ftchusmhKpY8WBIGHLAWTrQ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uZJSq4prMlNBLIuyD5obScedzc0bW8jhVgjGbuEk+ou40TKgjDTqFXO2nPE+4StcO07ORAWRvloCBpt2NzjPo/kSCZNi7aOOg51TRlIRc9mcS7u+CSg4pwQqAUefYXMRjqquBL7EwNL1poja7Ray6UWs4QyCtIKXYoOqp3DM+Jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MIYAp7G/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1825C2BBFC; Tue, 7 May 2024 17:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715102048; bh=lmbWOT7TNgeizDvMTV/ftchusmhKpY8WBIGHLAWTrQ8=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=MIYAp7G/KBx6IFvo4E46E3D6LvdGX6iTXIHdYcHiiEcXLfETvEisk9q/Q8Ut+2JPy xvYknQAR2kaLDE5xB9eed1ex6HvJM1gmyNVun79yD75QRVzdAf+KasDq29R4rTp7Ky BMw5bVlRAZIy8fWJ3aebPO8wpGvsPBLk3ndrM9/NEWNabtgiHaYS3XqBAS96EVJaNN Pu/DY4k5omP//BtluIY2vjJCsTLyE37ySHHiIFlVfxJQNcP2op7D/xsnaY+NgaSHyj XQ1KbiAKnDq1xyOtTV4VPtPLIpgpKxeerTfV2Bre802M2g8JWHdsQKbWMU5PLjGXIu CIM/AoqF/ISpA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 403B1CE14CC; Tue, 7 May 2024 10:14:08 -0700 (PDT) Date: Tue, 7 May 2024 10:14:08 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: Valentin Schneider , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang Subject: Re: [PATCH v2 18/27] rcu: Rename rcu_dynticks_in_eqs_since() into rcu_watching_changed_since() Message-ID: Reply-To: paulmck@kernel.org References: <20240430091740.1826862-1-vschneid@redhat.com> <20240430091740.1826862-19-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, May 07, 2024 at 03:48:18PM +0200, Frederic Weisbecker wrote: > Le Tue, Apr 30, 2024 at 11:17:22AM +0200, Valentin Schneider a ?crit : > > The context_tracking.state RCU_DYNTICKS subvariable has been renamed to > > RCU_WATCHING, the dynticks prefix can go. > > > > Furthermore, the "in_eqs_since" part confuses me, as IIUC this only checks > > for a change in watching/eqs state, not that RCU transitionned *into* a > > EQS after the snapshot was taken. > > > > e.g. if > > snap = 0b1000 (EQS) > > and the following rcu_watching_snap(CPU) is: > > 0b1100 (watching) > > then > > rcu_watching_in_eqs_since(rdp, snap) -> true > > > > but because RCU was already in EQS at the time of the > > snap - it hasn't entered EQS "since" the snap was taken. > > > > Update the name to reflect that we're only looking at watching/EQS > > transitions, not specifically transitions into EQS. > > Indeed in practice the function only checks a change. But semantically it really > checks a trip to eqs because this function is only ever called after a failing > call to rcu_dynticks_in_eqs(). > > So not sure about that one rename. Paul? As you say, Valentin is technically correct. Me, I am having a hard time getting too excited one way or the other. ;-) I suggest thinking in terms of rate-bounding the change. If you do change it, don't change it again for a few years. Either way, should comments be changed or added? Of course, the scientific way to evaluate this is to whose a couple dozen people the old code and a couple dozen other people the new code, and see if one group or the other has statistically significantly lower levels of confusion. I don't see how this is feasible, but it is the (painfully) correct way. On the other hand, it would have the beneficial side effect of getting more people exposed to Linux-kernel-RCU internals. Unfortunately, it might also have the additional side effect of making them (more) annoyed at RCU. ;-) Thanx, Paul