Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp64969imm; Thu, 12 Jul 2018 14:14:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfR+jv1mX6J/dDP/0qfrWza8IPX/ITgG3ezoUXhU33P5go2/FcurDYrZdzZlV9wT+hjqj97 X-Received: by 2002:a62:a649:: with SMTP id t70-v6mr4068247pfe.149.1531430094164; Thu, 12 Jul 2018 14:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531430094; cv=none; d=google.com; s=arc-20160816; b=XcMBgiZnQhttpBybYMBCX8USJJiP1fRAVNi3l+5gg8VLZKnZRcwLB0D51s3SNenag6 ZooyQnP40KqbqOzPicF/7IiUkqx+YNdBt/GyCLzXdLfSBPchVCXJiTTf6Y9Sfo91mGxr ThrmJzsJLmbxTmUAOq9wl9/+Z+UgiCclkk8sQjDMuSHMFsTCyRD4Zrb4cTk82EQjcmBN cVB4+/+MrDt3vRAkNBa+Ww0fg2bBVXgfaRhAw9ax467IShrJpAM51ZoV30hZ8tBzVmK/ GJV7/ch1DQZUBiNcuw8/8MYakU2CkD5Q5jt8pkujCnK6lKTTveuWesogEP0qR4zP1bYx D2nw== 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=MLBrXH8l8BEh3BfNKPVXEtzagAfU9Q66aZ7Q5xL6in0=; b=fiLEh20lpBSmJX4Q8JlvM3wwdrZ6Dej/vRsQVO9sNz7u8IRsvpW1Hs0n2qVHMMtniG eAzzr0VLuhImhRCC1rFkfyTdKrxKr5hD3XxxlHMHUvu2xcTYCPWRmp4Ze6anu9t+bBvD jqQBtdcZcp/Nr4GB9w9ePLhtLr+iOmUKdXM4hhT75AJu1bT4UbSRfsfa6aKyzaGPQ5xP b00TZz087B/qbodeR8tehYHAFYwyb53nDrdiLBTLgmXbgBLf/kSQzqdtrSIx8xj9XOGV C03wVpBt5IES3xyPObJsR5cVe5hCcArr99lps/dkTIR0YiZtl3X7HSNkOBJM/B3rzZwa EJ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Kc3w/VZD"; 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 o15-v6si14410307pgq.236.2018.07.12.14.14.37; Thu, 12 Jul 2018 14:14:54 -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="Kc3w/VZD"; 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 S1732905AbeGLVZR (ORCPT + 99 others); Thu, 12 Jul 2018 17:25:17 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34608 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732816AbeGLVZR (ORCPT ); Thu, 12 Jul 2018 17:25:17 -0400 Received: by mail-wr1-f68.google.com with SMTP id c13-v6so23013413wrt.1 for ; Thu, 12 Jul 2018 14:13:55 -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=MLBrXH8l8BEh3BfNKPVXEtzagAfU9Q66aZ7Q5xL6in0=; b=Kc3w/VZDqhMxfuqVdcFNwynV5/U/FW4xMiRNwBPNzrK6ohp2ydHp46KFUpzQRL8+uz 1HzsNjp1gXqqzF9fpJToLfpFL/gF1cJPfqQdWerACZOsorLEuMYnh+Ua8l+wzPRhSjcB LM7LznRz8aS3DbbH68CCWJhKE5jhqZh2znUXU= 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=MLBrXH8l8BEh3BfNKPVXEtzagAfU9Q66aZ7Q5xL6in0=; b=QZ3x5PoO7arpcQa638/XCtfHFpjQK+BtY+kPmkrrn0wGoruvvPdu3Uc9zc4poyuJvU XpncxJCYal398qDgbiI1fLci8rg66VWjVS915AY3YmZ+RdV2VCvE8Pa2GtXgYtVkKwT4 af5s27Mi9kmuBMlWYKJuyPk7Tga/jKvTFjAs/sMvgRtETPyE6blNLrc/VBUPVyFJGOIh d2Wr+DZl6EkOibgLBV9nDDtekbI1xRgbgqZcm5Nty7zvUarfsZJLbMpS6o7MQ1Yu7U2n XJwAGSbPeUF4kL+dCAbT1jHPVWexyXZXgfs59DS9tvDURORlcWQ4buYNAdS4lbkqu7qi CaRA== X-Gm-Message-State: AOUpUlHmDtNXjFDGpud7xZ9BcYInnZ4V8rNjNoLmwEfFvZS2i8CMNUaL iPrr/seLiyF3IwzTFmbiNFAXwA== X-Received: by 2002:adf:9b11:: with SMTP id b17-v6mr2851325wrc.119.1531430035160; Thu, 12 Jul 2018 14:13:55 -0700 (PDT) Received: from andrea ([94.230.152.15]) by smtp.gmail.com with ESMTPSA id n23-v6sm4103291wmh.6.2018.07.12.14.13.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 14:13:54 -0700 (PDT) Date: Thu, 12 Jul 2018 23:13:48 +0200 From: Andrea Parri To: Alan Stern Cc: Peter Zijlstra , Will Deacon , "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Kernel development list , Linus Torvalds Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire Message-ID: <20180712211348.GA5308@andrea> References: <20180712175228.GB3533@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 On Thu, Jul 12, 2018 at 04:43:46PM -0400, Alan Stern wrote: > On Thu, 12 Jul 2018, Andrea Parri wrote: > > > > It seems reasonable to ask people to learn that locks have stronger > > > ordering guarantees than RMW atomics do. Maybe not the greatest > > > situation in the world, but one I think we could live with. > > > > Yeah, this was one of my main objections. > > Does this mean you don't think you could live with it? Well, I *could* leave with it and with RCtso locks, ;-) but I'd rather not. Assuming that I will not be able to resist this RCtso trend, ;-) would the below (completely untested) work? let rmw = rmw | lk-rmw (* from lock.cat *) let po-unlock-rf-lock-po = po ; [Release] ; rf ; [domain(rmw)] ; po [the rest of your patch + the updates to the doc. I suggested in v2 ;-)] Andrea