Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp418837lqo; Wed, 8 May 2024 04:05:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBwXRu6woi1WH+6662BjviPL8Py5+xFi0u9SGhFBvRSDiWSewD+Uz9EszAe9cw5PGyJR7ccCD0HlVmq7lp//m8jsWMrb9M8C/JaYzJzA== X-Google-Smtp-Source: AGHT+IGDI4C+U0DgyIxogQV9DvuiVh27Y5xQCzhibT2DElnXl5Z2eLqUAvReu6Mj2vq76ym6kD8p X-Received: by 2002:a17:902:f80f:b0:1eb:1f3e:5de9 with SMTP id d9443c01a7336-1eeb0b9cd15mr17274225ad.61.1715166323725; Wed, 08 May 2024 04:05:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715166323; cv=pass; d=google.com; s=arc-20160816; b=KPpg+9I+ibhwHJqIECz16f08bjVkMPYoLKQ+Dkv5CnXtc/nYKZBgM/vx+Fn6/GRFdz vQNKJM/XkYFMuqCSOo2BfGlbCU/Ih0wQ5k/X3lIkuYwubCdaXChDDTQ7y8j/eGlLfBNb 3d4ojcCr19SqggTweKpCfhttK2E5FKo4rBHZ6W2Je8fVDO0aJ7Z63y3WyI/i/qklQhu7 KAbLx1JBgU1YZFZ1t1tOx87PKOD1m4F4dxJHzWg7Q+iCF7oXC6nhONNaWkQs7MMDY7yR clM2B0HfZIdIQzBFWH2Q7Joe9WHMXAWrKV7Xs5DnYi1vMAgv9vaEPJYJXSZgYjkBvXip 7+Eg== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=WqvvLZuDdaLpLRWtXKZ5muzIoL17R1aI9AXtWx49JpM=; fh=WZc//Dx/j7n4GOGRgzQY/JceGU+J/elw39pf465xEbg=; b=J17oxM5/aWEelB7BE/+M4d7gLy+YorVzC51i53dhkAWm+JMs54uhJIuL9SmA722IXH UW9Jt1yZHA0hRNH1c0r7v9vfm7piskY8AgfAZdeR8ucPvOx1gzl3Bov3PR1VLSI4rEfI g/en53R01lX9z0tEfnReO595k71oNcnjodwlFMymvuG0M/swVmV1K9jwMKLA++NY/VTQ zyrNH3xeX0KEg5FNR0ui6uYMw81nRwTka0a7CMrTr3PlvFpUsQyy2qhYa9X8tQH5gYK+ HXe8sE8QI73wwgFwn8zfhneo3kf31iR5zeJFg1i/wKWVSjNB1d5fzvI1t58YZHuaZkgD cAkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D4QZLng8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173093-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 c8-20020a170903234800b001ecc70fb7efsi12463814plh.130.2024.05.08.04.05.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 04:05:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173093-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=D4QZLng8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173093-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 5E732B23552 for ; Wed, 8 May 2024 10:59:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0971C81AC1; Wed, 8 May 2024 10:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D4QZLng8" 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 2A1E38172A; Wed, 8 May 2024 10:59:06 +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=1715165947; cv=none; b=hRF+n/uicCFKTZWOYlOHAG8s4vKMIhtWwLpgkB9DjC9feQeiPidemI3pkWOH00H7qP3raW6asUjohFvC4yB3sMGNdcpgk/ts8fDglyubI3eTZkcfJQJg55JP9+zAUdcc64NN3ZUgZs9EZNQ16/IXrSaidzsnBW7G5sc3QuuUZ5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715165947; c=relaxed/simple; bh=6VZ7r11vgmtx2F69LIOMPd3L9p0ehngsk+gDZpyp9lo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F/hXcgXtrBvWlja10N3U/FV4AXAymmI4EIvihIXKEIYnB0hrStdQAWr2U3eBJPtdaDITxWJNwnfhTBRVkoH8NAl2mdKJjiLX5gXMM0AOB8Ka9vlYU8N4wl8F4zG4bHXJmD4piHNtymfgv7aZsVPlJRVrqTDGN2m7rmo55BbBbsU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D4QZLng8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4580EC113CC; Wed, 8 May 2024 10:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715165946; bh=6VZ7r11vgmtx2F69LIOMPd3L9p0ehngsk+gDZpyp9lo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D4QZLng8qe62yhyqFmtJpj0LltREfFRz6Vfp0qvmRJBPjp6uh0iDWUslUZT5Y3LMh CbVilUqsouBVEmNYSJEqDdAgrn4lYW2qsI93uUhRiEKcDO4yq5ky93xkk38vDNgKrv j++AKQE2epqE0M+F+Dx5RNS4begnpFtE3K9D7H+b6nxVvqeUw1VDjslYXUmk/9/3Z7 zdvqjQWOcdbzskcT1OLxQuNV2SmKbXzErEWrLs9GxututtNbU/SmCjulZPEeFZyxHS +s3rdrAIoN8aL5LrDkak/hly8ADJFOi0yYm3yGoN5koJnmdMHMNsekMe47k0OtWwco 0GU86vKRbMfQg== Date: Wed, 8 May 2024 12:59:03 +0200 From: Frederic Weisbecker To: "Paul E. McKenney" 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: 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: Le Tue, May 07, 2024 at 10:14:08AM -0700, Paul E. McKenney a ?crit : > 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. Makes sense! > > 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. ;-) Sounds good! I divided myself in two blank RCU subjects for a double blind study and locked those people up overnight with a paper containing both proposals. I opened the door five minutes ago and they both elected by mutual agreement rcu_watching_changed_since()! Also they are thirsty. Congratulations Valentin! :-) > Thanx, Paul