Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp69185lqc; Thu, 7 Mar 2024 10:30:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUOqmiz2GRprxyE6/9jt2BU3vcozezZkP5I3Jfis0NUM2al0cSXYNve50vrCmLW/S6q2gIkd861usgBFAdcNMfnn8shiH12qCMOUFDd2g== X-Google-Smtp-Source: AGHT+IEoMD0daxEGeMDbeGU5nQf6M7QSLye+1v9S6wrRTvLWj1mRFpRKhTZ52GOE/sh5rzqFK0Ku X-Received: by 2002:a67:ed4f:0:b0:472:8d0d:1708 with SMTP id m15-20020a67ed4f000000b004728d0d1708mr8067232vsp.19.1709836238425; Thu, 07 Mar 2024 10:30:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709836238; cv=pass; d=google.com; s=arc-20160816; b=z5ps51R97X6fNYmmg68NBcefxT3ZmVwj69MFlFkjzXt+QG1HkBqG1KyV3S13uFnXRW lKeudmjnO8sSSRcOJCALeEosPAlG0vYBxN3oFHzvsx/UjnLdOW3xsxgphnyF6+A1evFs bZtfcGUC2gJrIpXQEw+QkeIGH3208H7gK+8c65OvEm3yNhZVqo2Ju258zwcHqLI+M1n1 hRAJwWDG8PGNT31QXiWeDwwKC5qVm0wK9QaYoa7ancBRmq4CRzcz5pExn1V9Ad/0mkrD w1G1+29oKBR/V+NXygeiKrrRSvGHeURqdDqTNFGqa6iFANs4wzekFlltdtddAe/rjNq/ rZdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=hqPQWQR+pbscgglxjJ4Gzgkk114peIUtjSNtDTQNIHk=; fh=vclOy54vrc4go6iMECrcor6hAewGQ03f2X+1SnH2p10=; b=Fy/PrrIn2cYjrzgzJHBw8tYYllAmjTcO7+AihvuCvdhAdjtlXl26jJtqjO/SzkryVt ETrSNvF3QJgtiiZQHBcprNFdjxF8HIWmg10LRdnW6RzKegIs3J0EuMMMDr22rx3Bu8eA inargFopagcGkeUlZJUAi1X7gB6I+Agik0yFCn2AydlC0IwhY/KaAfep1at+Dnp6SFDF WIX6eEciDhqDAakvAG0RWVDhyluyRDvOVFIi6o8Hrht1U0jQFhe0I1bHk6gZaxPXUD2A zsI3AEMgRp3EIJTFYzyUU0HgeXAIIcbfrclmjDdDOPbLHy2QSYBpoe9C4JW9d2AewBW3 P8dw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-96015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x20-20020a67e894000000b00472e2267867si1107617vsn.832.2024.03.07.10.30.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 10:30:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96015-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; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-96015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu 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 20F671C20F7E for ; Thu, 7 Mar 2024 18:30:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C97711CA9A; Thu, 7 Mar 2024 18:30:32 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 9EAAC1CA8A for ; Thu, 7 Mar 2024 18:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709836232; cv=none; b=RPQ0FsTkjFWDa47OszQYyZGSvMiEBRsL+jP9nF0u/AFnzVUB48VnaCtVzGiU5BqKaQGUkMpJ7L+QrHs66EdtA6d8nHXdA7xNsKGJYLmqiUmaKrDfkoYL12yF4iJ4SQSklyw3e/YRgRc4I2Cp0HNMhsI5dBX2Dw0SG2REaSFyaGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709836232; c=relaxed/simple; bh=EsjxUmMOFGlEYnJvDps6DJCfL6v6Kx+yjlql86ERYsc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DBt57h1dT0YTtpOKRI1pRHczyxEbZsaOgu2wldtAMQkAE/Qz+yzS3dDYt7lB2LbqmE5BM9c9GSWLXyxkoEmBHC7zczYDcOXtE+b7Z64HRrkC1fzzu9Q9J7UwGPhQ07gdUxeutwH0D+LtPsPTQS/vbqDTEprqHphHDSBb7r97ISQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 227946 invoked by uid 1000); 7 Mar 2024 13:30:22 -0500 Date: Thu, 7 Mar 2024 13:30:22 -0500 From: Alan Stern To: Andrea Parri Cc: Kenneth-Lee-2012@foxmail.com, linux-kernel@vger.kernel.org, paulmck@kernel.org Subject: Re: Question about PB rule of LKMM Message-ID: References: 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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Mar 07, 2024 at 07:18:46PM +0100, Andrea Parri wrote: > > So I guess you're talking about the second, intuitive meaning. That's > > very simple to explain. Since every instruction executes at _some_ > > time, and since we can safely assume that no two instructions execute at > > exactly the _same_ time, if F doesn't execute before E then E must > > execute before F. Or using your terms, (not F ->xb E) implies (E ->xb > > F). Would that answer the original question satisfactorily? > > I'd disagree with these premises: certain instructions can and do execute > at the same time. Can you give an example? > FWIW, in the formal model, it is not that difficult to > provide examples of "(not F ->xb E) and (not E ->xb F)". That's because the xb relation in the formal model does not fully capture our intuitive notion of "executes at the same time" in the informal operational model. Also, it's important to distinguish between: (1) Two instructions that are forced (say by a dependency) or known (say by an rfe link) to execute in a particular order; versus (2) Two instructions that may execute in either order but do execute in some particular order during a given run of the program. The formal xb relation corresponds more to (1), whereas the informal notion corresponds more to (2). > > The new text says the same thing as the original, just in a more > > condensed way. It skips the detailed explanation of why E must execute > > before W propagates to E's CPU, merely saying that it is because "W is > > coherence-later than E". I'm not sure this is an improvement; the > > reader might want to know exactly how this reasoning goes. > > The current text relies on an argument by contradiction. A contradiction > is reached by "forcing" (F ->xb E), hence all it can be concluded is that > (not F ->xb E). Again, AFAICS, this doesn't match the claim in the text. That's why I suggested adding an extra sentence to the paragraph (which you did not quote in your reply). That sentence gave a direct argument. Alan