Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2972037lqo; Tue, 21 May 2024 03:00:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8EnTb/1Z40Q68srnqD4HXp8bnvXOtU5oFsUldse44UK9Ou/IOtMOoQ0ghOOho8uXr+lXWHMnNUOBmRd4z+TxVhKMP7e6B5Jeb3j92YA== X-Google-Smtp-Source: AGHT+IEoQyMbrUeAQOWgEJgnjHzA3USIm/vqYXOuU7podIwlyg6aNk65ZcMQfVeuWvnQBooiI9+a X-Received: by 2002:a05:6102:b0f:b0:47c:607:eed2 with SMTP id ada2fe7eead31-48077e1b774mr29993155137.18.1716285606980; Tue, 21 May 2024 03:00:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716285606; cv=pass; d=google.com; s=arc-20160816; b=e8ic2IWvjejHB1gytrSrhaZ0ay4bHV5vCMvJvtZbRehHjOCSj5d/jbXb1Jl16h2BgT VY/nNqlowb2o3f3R+yJX35Tpvu4IwufKg2B66Z9+DChy7v/rScdaxorGx1NexmBOddTf 2wFPffd/hxsjWcRRGMdweg4OKZsKlBhLTab61v+oO4d158ao4QtZwGLOuUVyIXNJgsha gRWCqLI7qliTz+8UDkIH5vMjAJaBq91YZKZticxf4/1uHPSgxA7O4l/DRAbgowvLSC4k wGwXcZwXxnyfyQt0kMzpVWdY3Z82Y/i1XeBrD/m+jsaeqVigdOfZT8wSqbPRLv16pYPH qykg== 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=h/d5Ssac9ocTmKBehZDNLkOtgF2Lr1Jq9dJJ9t3KAfs=; fh=yhuDoxHaBA9peVZNmdI3tVYFnOHz0xU4NQJfZ3vD3jA=; b=RKhy8N4IpPENR6/A7m467cmjwY8RQkKp+2OWyhKu8fDaQ84QM7hBCrHqaib1MFDMg6 1jEYbbla+Bd5DtxjXjXlR3JWbZnGmQlUFKB5+NPwGtZJm1GWI4FKabuJZgWAgtBHJYqb AFDP8Rj3606xRuRIHtDiXXJaNO65D+TBLW0l98Hi4c2WYEfBjVMR+T6y+agwHqha3oO3 gJ+pvgdbo8PCaXwZWf88HwPqA8Eqb6+fBGJ9G6oghUu1a6mshDtj4W/RntiVcQkXf8l0 juvhNnD+At5w2wDcf/M9t8LDBBacHAt0nssCaWOq0GMf3AQ1kLof17haGf4twtgoBGf8 YoAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XyfMop+B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-184745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184745-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df566f5b2si281203261cf.360.2024.05.21.03.00.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 03:00:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XyfMop+B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-184745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184745-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B12351C214F1 for ; Tue, 21 May 2024 10:00:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 773B76BB5D; Tue, 21 May 2024 10:00:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XyfMop+B" 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 93AF561664; Tue, 21 May 2024 10:00:00 +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=1716285600; cv=none; b=b1rATSMgFrTyBL8lQroZyU7algCWRIUb1YCm3MKtmaW8lWJU1VaVrJthtKrzsCYlWuRuZyy0f1aRPCPVwkZJWh4wB9OWDetiVGj33F4+2Pk73IUC+yCFXQ0MtMYJSF8dFMAIEcRkZMb1YflGqdLlBVkaJY4TsIbHq+w1kLnjntc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716285600; c=relaxed/simple; bh=1V+29lB8btSlk68MGRUu8mgqZi72yOl5RrQVg1+kexY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N9B/q/p0EajYritAlaOBoO3JHDQTM/ckvsVPGr7Lp0PQkELFGTobpG5hk81/k97tK6vOegkBX0ZdmvGixCtnOgwRSVdTqdWe/qCp5VyVwQMTtUUGffUR4f9fHc0LpfltTwcistaXem/SBSOiGdiV2nzAXNyXR4RaiJo1/xNHTn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XyfMop+B; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C31C5C2BD11; Tue, 21 May 2024 09:59:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716285600; bh=1V+29lB8btSlk68MGRUu8mgqZi72yOl5RrQVg1+kexY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XyfMop+BD1EOaHMDOUcgxCjgGH4r0BVXE4kkuV9vX3spvPSyjikPXNRngWxSruEQF Fp8mI6YDGTv/v7LiRB1vLcaLntsQwG/BOk8Ywn0HUiXBo2PDwLqcUy0xQ/fZCwo2YQ YUhj1SLn0tavDdt3dd03SMM3IAubupU6w4QM0VczXp5us61s12Px/QLrNHzsS/1Q2l iKaNEaX6NUf7piEuuwFkYFDVyvoPIUqbR3n7R9F32bWn07cAgmMjdS2a/AMZ7NgJe9 rzNFi792eS2R9KUkxgIrgUn5nzX/TGiAPPQStT0TykVpFo7ZdUElYS6e2WT+HVcz2E a54SjffkfzIDg== Date: Tue, 21 May 2024 11:59:57 +0200 From: Frederic Weisbecker To: "Paul E. McKenney" 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: 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: <24467166-5f00-45f2-867f-40b8a836d085@paulmck-laptop> 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 > // 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! > > Thanx, Paul >