Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp92303lqc; Thu, 7 Mar 2024 11:10:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXN7wlYPIKJGxvDc9JBFuw3Y9owFQ2qWqec0gWkqkQb8Br2PWEpJSm0S1aEDCjcnCBblqWfG2LXUa7gE6bodp082j08Fp2z1DxOkaiRYw== X-Google-Smtp-Source: AGHT+IHSCauPLygJwO5lfp/ZR7Xv7o0WlKxka+UYg5IlnoYuvlVEi38RcGuH9UOwF0yhzg5X+kPZ X-Received: by 2002:a17:90a:de96:b0:29a:5748:a67b with SMTP id n22-20020a17090ade9600b0029a5748a67bmr8144686pjv.11.1709838659061; Thu, 07 Mar 2024 11:10:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709838659; cv=pass; d=google.com; s=arc-20160816; b=b24OM1K/izgahB4wwPE1vRgl1Qwycq7UfTtyJx9CfImZZs81vRihAj029p7JQCBg3h 0JD33/LgIJnRwGgUjukJoIbpn3XpH7eMSVsosLFgl6gqbN64kpUXy1WulIHt3jHxJaYq 8dFzoMSiwJoIBca4dLzUa2XHaB6FZH+eh15jDDsM40QM4Qbt2TCg74zJmh/+gtN8djGg nh0TXuLd2qsQl8jfacLcrTy9zNfkIYtjaLuTsmJFHTnuokl+2wEgqa25PbaNoE2r1Vel fqVYEck/opkOqA+s2FGUW/lRT2uHUeh4XEXVWXEAu1VuUEHPlJrP6Wyr5Bx73+kwlGG0 uvMA== 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:dkim-signature; bh=WWwNH3sz9yXBSWgT8KL4kcpHYy1BeQvdzHXc1X2rkTs=; fh=tP+lAE/RsaQR9Bc1+e9vSPETHJuyqY0n6iF2Qad3i2Q=; b=1DG7h2eSmi/LPburGzbL/j6sJ+CfvXavD6qBlM+ZLPR6x45satLqP8GTWy3jQNuzLI PFkhkInjsD3k8RlguAJe4/hsG5Gs4dPmwtq13K1HEd6eFMAA0Bq4+sY9Vf3doEBjEyLJ k2JdWV3n9p/A7SjU/qfdnuMaUvah9q8qDWlRTpTSR37aYnPa+oXcmEQjBcCYGKPHcphv byC5w8nYB2wi9oWzLuodgR4YsYv4TMz5862RnTaKbMqvOFplUs9uial7b61y5usy/3SQ XkYcO+myP9amfO32rXHMmhHDta9fhuWWeU4eUwT2b2ZUv5OiY7q0mFAsyKm0ifG1FpV+ 7Jdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="SlRJ/CIB"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l13-20020a17090ac58d00b0029b2693d27csi2149583pjt.58.2024.03.07.11.10.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:10:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="SlRJ/CIB"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 BAEA6281B2F for ; Thu, 7 Mar 2024 19:10:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33BF3137904; Thu, 7 Mar 2024 19:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SlRJ/CIB" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A589413664F for ; Thu, 7 Mar 2024 19:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709838534; cv=none; b=Do2QTDeaNJr7YUtxxbGAF+79ZUUazXeUqk1RzGCGKJaw/1cDTZeCHBPxqvkzUQJ/UtFKUgAt2DcK4H5qlr1XDFF2IXmsh51Cqu0GYsF4kpeSYzMPy6iiZrBDHnsSfDfpXSaaCJWueQJyVIJ1yhqV4OOj3vvgy/0+244WqFqOBro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709838534; c=relaxed/simple; bh=UFyayZ0MeBLKORhw7dQZoLLj9DvK03YvbjRbbZyWTGc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=esVtu49IN7rtnk4LXQ5JqQlicX8TcYAg9nx3g4GZDU7dWIHpuLc8XMjFYuGbOnOy2qHWZ2RJ8+UKgfoFmYKAoJpymibzcw6T6r8qLVVbSpbylbIUU4xjR68sks7wu3waMkh0l5E0gjTAXbpyalTG2YdYqHwBwBKw+0jn3SeAkJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SlRJ/CIB; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a452877ddcaso182036266b.3 for ; Thu, 07 Mar 2024 11:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709838531; x=1710443331; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WWwNH3sz9yXBSWgT8KL4kcpHYy1BeQvdzHXc1X2rkTs=; b=SlRJ/CIBFd6qnAxqr73uiLHB9xNmpV7SIOkez/a4vuUaQBNykDMxwstsdiI6w/2tEH CxU6mB9gsCrw5tqF17skRsq/Fcp0LoLyNgDdM6AZcatEWxqy44ONB/B4sh41ALAOItEv 3GsfOhTIKKBIadpFuVrVWjfEyw1mXVuoDGO8puD+1yjFT+Hlh1k4dI4C7AwmDuIvUP0n vYbV5W9dh5UonZqonD5GCA6x6Z40REdZD9Xy3QfL63F6pzchKHm1iGMLg7rEHPb/NTbh n9udI+FWK+8CMhW86Pct75uHLVfb/ZtwPnwkvXIc5BqFkgO2AhU3NrremjO5+HQ+qAfx T5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709838531; x=1710443331; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WWwNH3sz9yXBSWgT8KL4kcpHYy1BeQvdzHXc1X2rkTs=; b=gLC1kodp9Q+Nq2MSUxQLclrgzVZAtJ3OaOXeyMuTyWwP/7b3arzxc8ix650ETjE+lc URouBQeI5WXzpjeJPMWSZ3KFixe4GSLOCsOHJzvHpq5tt5/xjpwLa7CGpZc/fsxWqQgt ycWlkb4zxPFfXJXovY20L9wc1o59v3IcwkTpqoiB2YSzq0fFBLsdh+cv/95V6m7tN4mz +bYTpuKNNTJx/MH/Ysx086WLJ+kcd00xz/+/kgM0zyQd2Wev/4n5mG4CEdwM9Chs/Zc/ cfu6jiLM7bmUXFlCiF5mhkSiv++5CUH+giBYZq2w4jS302puzjm/QFJYp1oAwCxo0d96 3s3g== X-Forwarded-Encrypted: i=1; AJvYcCVH/sT1Ue/6hWILeKDa9thcxOubDL0qiLns1c08wqaAjtMhu49u6mz1EuY+vswr2+3xvrhjSl3LcPQsSJXyqKk9N0Ag+G8T+ELYnbwE X-Gm-Message-State: AOJu0YyXKKf5VvqhA2JxPuU+ar9e0VB4YGJs9tzPxuvWRh9ovVdQKCCD Idk1S5qvvamzVYu81Rx06K2rN1oWkd2rPieKcGrCBQghu1gcoe6DbnM3+S6t X-Received: by 2002:a17:906:3941:b0:a43:f825:ef57 with SMTP id g1-20020a170906394100b00a43f825ef57mr13149395eje.49.1709838530703; Thu, 07 Mar 2024 11:08:50 -0800 (PST) Received: from andrea ([31.189.122.3]) by smtp.gmail.com with ESMTPSA id x23-20020a170906135700b00a3e4c47bad1sm8504509ejb.8.2024.03.07.11.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:08:50 -0800 (PST) Date: Thu, 7 Mar 2024 20:08:46 +0100 From: Andrea Parri To: Alan Stern 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: > > I'd disagree with these premises: certain instructions can and do execute > > at the same time. > > Can you give an example? I think I'm starting to see where this is going..., but to address the question: really any example where the LKMM doesn't know better, say C test {} P0(int *x) { *x = 1; } P1(int *x) { *x = 2; } > > 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). This appears to be the key observation. For if, in the operational model, (not F ->xb E) implies (E ->xb F) then I'll apologize for the noise. :-) > > > 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. Well, I read that sentence but stopped at "These contradictions show that" for the reason I detailed above. Andrea