Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1476921ybv; Fri, 14 Feb 2020 00:13:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzzgkrE4ADkQgxVOk2hAnIVn6HI2bJ7dewLTtE213kGqXWDu1IEqJYLcPsCWMpvDa29/GrK X-Received: by 2002:aca:afd8:: with SMTP id y207mr1034137oie.96.1581668008082; Fri, 14 Feb 2020 00:13:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581668008; cv=none; d=google.com; s=arc-20160816; b=dVyXCzLzLEEcZUhfPBQF1jrMuOM4vlO3esSb++uYEbirbplzGd852wp8U/tEXJ4roT 39zriAWTOHScf6A6cLVrNtm3187gk8cgsBPPYw0PNr+lVnPcbC4vwlJMYryKxiXaICnf beMfRi5PxvDpkMF523RkUo40thyP6MaCCY495o26t0963X7rk4MkFyaXedMk/I+/369o Oy9/J7j9WMo5D7QHWm6rRSvjSVr5s3ZKu0HNQjtw/cu2ZVr7xd6d3sqBUTpB7h1Q+LRM emmxNxuHPNUW6DBqJSHPOkIsK65ysr2pWN1i1Nxf9/VAx/aad8dgr/kwjthAo5t9nKCM WXBw== 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; bh=p+whp3SRlB3fcTDZeactPintXvEpOGniGrr5mWYhRNY=; b=ZqkjUgY3L32HOXJfVf6I5KDl9AtMuPoPhv7O/PxgT0PXCH/6APwBOdU2WG45O8ZbuY lASX30hq9V2o1cMO+4R/TEq0DyhE65CEPvXyy2VTWwesSgEmEH3bl6NVdBtOjh2WPlBO nuqE2LlJf5eoLZNkZQITb4rhMSFr/ylR0kCfK8SJG3zhjQvOtMtEDtiyVVBd6E8NSTG0 fppC4FVnbkbrX2weLPbDr/lcWCo8LD38dn0fZ/vpwWIezJIBp1jiX72Js0XJNUSLmMXu 5Rd8lxYuEbSmrAyzok720XScfyU9Ro2WLKxswZXtOsCIJWY68/hn0v4BD3MIlt7R86ue lfxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="tj2Myhm/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187si2416668oia.218.2020.02.14.00.13.15; Fri, 14 Feb 2020 00:13:28 -0800 (PST) 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=@gmail.com header.s=20161025 header.b="tj2Myhm/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729060AbgBNIMm (ORCPT + 99 others); Fri, 14 Feb 2020 03:12:42 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34963 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728332AbgBNIMX (ORCPT ); Fri, 14 Feb 2020 03:12:23 -0500 Received: by mail-wm1-f67.google.com with SMTP id b17so9581012wmb.0; Fri, 14 Feb 2020 00:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p+whp3SRlB3fcTDZeactPintXvEpOGniGrr5mWYhRNY=; b=tj2Myhm/kLBda1uCPkEcFyxgHOGUbf9nPC1yRk/wUGuz3xW2N2cp/BOztmVEpms2Iw Es2XmgXYlQlpR8cCq/qJGJqbaS2YJGjLERM0Wp8vKGgBVWV77Wkp0NuImZkCNd1y2cNc VDOYA9dGfR+XSLecDu2M4nV4E53S5K1IP49BAvuslw2NJftNUCs23UVi5KEvgJcbzniq cnI9gau1+0Zot2mJr4sMXgifFoqX/EmzWuJ6aR/HcS1jauqY1emNNQm0tXqcPkHtPNYQ 5+A8eAPKOW7NxdilnDZVvwb9Wruj8vFilFKX78eOCr0upl4xY6RURct1ehT493Q0jjV6 tRnQ== 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=p+whp3SRlB3fcTDZeactPintXvEpOGniGrr5mWYhRNY=; b=US8s8+Qw9MQ4Q3KYKfXED1XDpOr0Jq3lRm1+698XckKfyFLXknrhCiEbsMY7G9N9zt kmxsYMGUyjs3gzW1HHXcxkMwPZ6NwyvaxZY2JmX9F3Xt6ubG5afHdrX1/5Rv1IRIuVT3 Wg+yGRWTd+NVEpxvqso7rGso9gg2FpihKMELMJTwP5bDg7LAJL/KpyfJQrvSNOnyGgrq x7zPiT2ZvcCAu+Ngx6MdNsC+ADpuGvOfBKjk/Xex2U6qNhB6B/bt5UeT7VkDoOXhkzUE lrdKApJfbTLei9YYkf4fC2zt9a1p0hprez8ZvT0ea8JzT/+stnknHBu1vlKQwPQYJZR9 Htvg== X-Gm-Message-State: APjAAAUyKuO2WwCFjIuqZntxXyH1fz5eUwN2XkgSAkMHsNRdCmftL/xC l3s5sjfieGwISL+kyzFohuA= X-Received: by 2002:a05:600c:20e:: with SMTP id 14mr3191543wmi.104.1581667940936; Fri, 14 Feb 2020 00:12:20 -0800 (PST) Received: from andrea (ip-213-220-200-127.net.upcbroadband.cz. [213.220.200.127]) by smtp.gmail.com with ESMTPSA id x10sm5847657wrv.60.2020.02.14.00.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 00:12:20 -0800 (PST) Date: Fri, 14 Feb 2020 09:12:13 +0100 From: Andrea Parri To: Boqun Feng Cc: linux-kernel@vger.kernel.org, Alan Stern , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Jonathan Corbet , linux-arch@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [RFC 2/3] tools/memory-model: Add a litmus test for atomic_set() Message-ID: <20200214081213.GA17708@andrea> References: <20200214040132.91934-1-boqun.feng@gmail.com> <20200214040132.91934-3-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200214040132.91934-3-boqun.feng@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -0,0 +1,24 @@ > +C Atomic-set-observable-to-RMW > + > +(* > + * Result: Never > + * > + * Test of the result of atomic_set() must be observable to atomic RMWs. > + *) > + > +{ > + atomic_t v = ATOMIC_INIT(1); > +} > + > +P0(atomic_t *v) > +{ > + (void)atomic_add_unless(v,1,0); We blacklisted this primitive some time ago, cf. section "LIMITATIONS", entry (6b) in tools/memory-model/README; the discussion was here: https://lkml.kernel.org/r/20180829211053.20531-3-paulmck@linux.vnet.ibm.com but unfortunately I can't remember other details at the moment: maybe it is just a matter of or the proper time to update that section. Thanks, Andrea