Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1822194imm; Tue, 10 Jul 2018 08:26:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf3fpxyYntDmCnSEgHk2pVQjDV+8W9Nyg22VJC1au7tbtRbpRw2T10Hi31kFBk3wUcSztDW X-Received: by 2002:a65:4c41:: with SMTP id l1-v6mr23618461pgr.310.1531236387243; Tue, 10 Jul 2018 08:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531236387; cv=none; d=google.com; s=arc-20160816; b=dOk/mhbFj/5Wze/0/004EHrOBjkOxdmAWfJgBUMNP3UXGx4JnSshlZQ5wW0ckfft0V H+a+Eg4R1p046PdK42UBz9uOYhuWAkkPek4710JpxqNHIvRLql72lXgtw4MMtOUCoGjW 7SY2l6it/QdmCv61tsOeCGEHXnK8wMOHRoIWoCVgLBVJwwWIU08hjykNuDcZCcWrivtv x3zdKui3Xoz8msmUGunTZXgNK8Kk1Cshtj+7QDQ4GpagaLZ1zkgUMwimatH9dTcCDNBh 3TZQOWwtgxcrhzB7y6phTZYwUPujV89QYV4HYSk16UlU0ihahxsBgo2m27c/wCQw+A3J n2CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vTnG0SpBBAN+YEzPCAI8RQMGwfAvXUkJ2ZcGPhQJcjg=; b=0R9DfyebYZsIxX7eGhzXM65lIt+F+mitUE+ndPoeYL+5CJ1ql2TZst7STOTNGUjx3u Ak8oVr4iGu+2L++NlXX34dOpEpnzpDc21d31FFyqDV/frqs7tF0h5NoKCNUzWx7TEXKG JmawfdnkUwyQWxUDUKzKL2e4RXGVVZMmItTEa1wrpdV22B9KGADEyubEmrG0ckJR/wn7 b4UFfqfUzjAZUY46/w5VRKdcW5nGGonmWDaJ+XOKdxI02T9/23X7nnZrgppCbYqlFlk9 D4WtE3QJgCegoUc3EqDQFsTQ9Jp4x1+5uhWM46Q+UrW80CPLbHYUUOSf4OuWEECcu7g0 prJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=W8T5mnah; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m30-v6si15766084pgc.361.2018.07.10.08.26.12; Tue, 10 Jul 2018 08:26:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=W8T5mnah; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934257AbeGJPYZ (ORCPT + 99 others); Tue, 10 Jul 2018 11:24:25 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35732 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933374AbeGJPYX (ORCPT ); Tue, 10 Jul 2018 11:24:23 -0400 Received: by mail-wm0-f46.google.com with SMTP id v3-v6so21204033wmh.0 for ; Tue, 10 Jul 2018 08:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vTnG0SpBBAN+YEzPCAI8RQMGwfAvXUkJ2ZcGPhQJcjg=; b=W8T5mnaha8jUTM7zPH6AMF+dP3U92TsfW+/FnTPW3EUfDjgk+6OcTgJdNfPASYtwte 9OoEnfM+2xWOdUe6n541bVFeuUhUPVFk8/W+Dq3UFPvG+6EHsbciDkOCcKA0BojNwqR6 XXBh7YemuGxculFjit9lVv8ehRaagoHVDUF3s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vTnG0SpBBAN+YEzPCAI8RQMGwfAvXUkJ2ZcGPhQJcjg=; b=W1G1QzYJuJR7uZV2DwnIvEycg0v9ooc1xTbB/5Mn2tdCvLqORWEMyvO/ne/IxBwE9t 425Y/Qt733V4ahhwtalhoKLKAMLjc4UeU0S0kT1iBZuceF/XrgCNUiOt3f9tMgcg914A akzn7QGubSU5aAT+Yo8AQSEJAfNLwu8g2Y09ytUT+R4Hzku+AUcxJqe+xsm5zMeSwryL Z6psLfvkQx5lm9Fnr8kiEK1PBduFp1tswCXbAmiGomUhLeXhQ3zbbEIKteq1Gx5C4Ktr ddTvDRgqGsIlpk6A7EcdOjpukNvKzzaJsfADCotRKofz21S7fhGJr1TeAVXy48NE62vi Irfg== X-Gm-Message-State: APt69E1z3sVonQlBtAR/TXlR0Tc/PBuqGHhuQyL0ZuxZwBpxCf76vJcz 4eqT14d/esAXtHp7jFAZrNGWaw== X-Received: by 2002:a1c:30d7:: with SMTP id w206-v6mr14263284wmw.153.1531236262715; Tue, 10 Jul 2018 08:24:22 -0700 (PDT) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id w135-v6sm50404862wme.7.2018.07.10.08.24.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 08:24:22 -0700 (PDT) Date: Tue, 10 Jul 2018 17:24:04 +0200 From: Andrea Parri To: Alan Stern Cc: "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Kernel development list Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire Message-ID: <20180710152404.GA11437@andrea> References: <20180710093821.GA5414@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > ACQUIRE operations include LOCK operations and both smp_load_acquire() > > and smp_cond_acquire() operations. [BTW, the latter was replaced by > > smp_cond_load_acquire() in 1f03e8d2919270 ...] > > > > RELEASE operations include UNLOCK operations and smp_store_release() > > operations. [...] > > > > [...] after an ACQUIRE on a given variable, all memory accesses > > preceding any prior RELEASE on that same variable are guaranteed > > to be visible. > > As far as I can see, these statements remain valid. Interesting; ;-) What does these statement tells you ;-) when applied to a: and b: below? a: WRITE_ONCE(x, 1); // "preceding any prior RELEASE..." smp_store_release(&s, 1); smp_load_acquire(&s); b: WRITE_ONCE(y, 1); // "after an ACQUIRE..." Andrea