Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3087111lqo; Tue, 21 May 2024 06:38:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXHK2ktfUlh13ZkSmucWo/r+QgVhjDTdClP3CMzuv781ZBoxahIMFVonncf0LEo7J8y9wuy322tLU3B1qspVgPTMa7o/qe6UlSf7WaFA== X-Google-Smtp-Source: AGHT+IF7Uy+ttup3ZrfljFBKgRs7DThzsmUrmPY2WxELF65Qs6Bi5zMAjUVyUEi/d3r5etDg4L4Q X-Received: by 2002:a05:6a00:8b03:b0:6ed:ca65:68b with SMTP id d2e1a72fcca58-6f69fb7eda5mr11328975b3a.4.1716298715895; Tue, 21 May 2024 06:38:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716298715; cv=pass; d=google.com; s=arc-20160816; b=GH2DR5UELAAvO+Ev3hVn/Qo3+ca47/FgM+ITziu+Hj9itsPHB0EcaE61VJ562UPGk7 q8I+1ZEtV5gAkR3JwLkMRMbY9NwmCpp8wahvDwfbxVzKWoHIucC9LiLeBhdBFTc48Ujp PcDldv/oHTizX7I9Z5ttXGVf0Ys+Q1jB0PVueHNTRdeu/UIPzl5AE3RLjEPtEO+SDxyO vy1/jKOhxtb1P3yLP7Jt7NqJSHZoeODW1SCZYUpkaHH8E5ApSc3O5aK6tryqx4Mj1IPD IM4vbVWYXOj8VLVPL8orwB61WnytzoEr31gQxvR0PznCnRNsRddmQGDDKJCu613TN4G1 7wew== 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=qrdRk04zlA89FGvZIMJyhoy001vm04Cs7JKlu6zN2qA=; fh=M7l5hFNAtcd4kjdNezJwH3gXB5PqdzG05MDqbZM4bbQ=; b=bkUFEnf/Rnib0sogvjh0I5QrTiahXB9s1koYPaGo3pIKQP9HGtMNYSvt5qdbFWxobD 0+s/A926Z2cn/Q3TTobbqun/xJr8J+iPWLY+pbXndQ7QdsQLWrr1YmYAKtu89mjPq4+Q mXnWDestBYMpEBYfZPYDP48wt6N5pIDftJjVai+OyAjr8aVAyaXqlC3jFhC17W157FqV y1GFJwJguLAv6WEE5dizxPk+DC/jHmKu3cfpLj8w/xER4um0Sd/naCuTycXsOQFgqaeT wbUeZ3zxL6+p0ehg/llvpKxlavNl3jHDtkPEMr7GjUgQRJoCGLQwmTOBkeESHib7k4cp 9LWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/ixNslF"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185022-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2aeede9si23924844b3a.156.2024.05.21.06.38.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 06:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185022-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/ixNslF"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185022-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185022-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 87A50283EDD for ; Tue, 21 May 2024 13:38:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DF6C7F48D; Tue, 21 May 2024 13:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A/ixNslF" 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 ABC4B7F470; Tue, 21 May 2024 13:38:16 +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=1716298696; cv=none; b=Vm2t3C9KEAcRw6z6CZBlaXHZ4nzmO1mEAjccDKhtEyNC9V3HnHWlt+0JS5T2Oh6HUz6lm6k5/FyvdIWo9HpwmHKsrDuMqOhZg47MJe61VREThx3EuijGtlhHqD5UgsTvmlaxEuaTIRF8/9W/tDMT8T7sjRKFQtEdBGaclNvifv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716298696; c=relaxed/simple; bh=sSUSRKrmceuENWL/KzJXA4iWNHco2sU8T4eWTx8iK8w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TApQbfWVL8DDf60LC7DmlNrQPIxXDldGCn9PkXRLOSHfJPWMX8D18XFglTbNPtnSVcXV9oFOpqUOVmhpEYAk1pCBBe8J7OFnrI6UBES8ZuarxtJDBF930uIbBRjXHHPA6A08vc33ajizFOls3Xx8hyTmrQczoATciBJVeqE+z6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A/ixNslF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22190C32786; Tue, 21 May 2024 13:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716298696; bh=sSUSRKrmceuENWL/KzJXA4iWNHco2sU8T4eWTx8iK8w=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=A/ixNslFKpAMaGwMJPmUMBS3sKWP7fxSt6EtcwoBetsgM4KgifX/h6D90UKZeG2Jj 6paLjUManLE3KD7+DAB9+Nh3ZcyGoSwESBwe3O+54GO8qV2x5ImKu5ABRzwR2DvgmK MIW3XrvkzkK1cbkZgzFJZeg7XEpWc/gzfj2dI/L5Gojfmb7lP98STFgwKKPKJPx6Es ZXNcPvxegWh8ruJOYows4jt/tSUkYcXUd6/ALPtCmnBvpAXg1GA2pqWIDpcdXlaby4 8UchifamgX1Wg3wDwjrm3B5vZKTZsbmcC3GRGpegJIZrAE96DNdbRYD3nSRrKW28IT ilB+5pJ2KUjsw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id AD82FCE0A32; Tue, 21 May 2024 06:38:15 -0700 (PDT) Date: Tue, 21 May 2024 06:38:15 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: LKML , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Zqiang , rcu , Peter Zijlstra Subject: Re: [PATCH 2/2] rcu/tasks: Further comment ordering around current task snapshot on TASK-TRACE Message-ID: Reply-To: paulmck@kernel.org References: <20240517152303.19689-1-frederic@kernel.org> <20240517152303.19689-3-frederic@kernel.org> <24467166-5f00-45f2-867f-40b8a836d085@paulmck-laptop> 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 21, 2024 at 11:59:57AM +0200, Frederic Weisbecker wrote: > Le Mon, May 20, 2024 at 04:25:33PM -0700, Paul E. McKenney a ?crit : > > Good points! How about the following? > > > > // Note that cpu_curr_snapshot() picks up the target > > // CPU's current task while its runqueue is locked with > > // an smp_mb__after_spinlock(). This ensures that either > > // the grace-period kthread will see that task's read-side > > // critical section or the task will see the updater's pre-GP > > // accesses. The trailng smp_mb() in cpu_curr_snapshot() > > *trailing Good catch! > > // does not currently play a role other than simplify > > // that function's ordering semantics. If these simplified > > // ordering semantics continue to be redundant, that smp_mb() > > // might be removed. > > > > Keeping in mind that the commit's log fully lays out the troublesome > > scenario. > > Yep, looks very good! > > Thanks! Very good, I will fold this in on my next rebase. Thanx, Paul