Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp73014imm; Thu, 12 Jul 2018 14:24:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfDxqwIRougoWDCwNq3+Xtziqqmc+epxoajsrIK6RpTVnf9vxnH/4IFSEeCXdXwu7CYIRgk X-Received: by 2002:a65:5545:: with SMTP id t5-v6mr3529704pgr.157.1531430693662; Thu, 12 Jul 2018 14:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531430693; cv=none; d=google.com; s=arc-20160816; b=SbpMxcUyxlA6dN+oc9Nj2AwyhzA3WEL10qlkIzfPtrppTc2edcw84wiXC2ppU1A+Z2 1SDCpSrrfhIrAjFgoLf21tT/BpNOh/ACyuZPs94T2nxql+2q6BGayXQBCgV+QUYuodlL PoBwLSTjx3XwBR9/fVBLOd9v5QCphRblKv/brHdVV1aYayhBvMxjig7iHqDiCzFlAdDH rVVRh2hbhL/rLcPLPCCE9+18ZVbG1O6jqFb374ABJK6DIA7rY1bklV5D64Dw5xuooSgB 61mEHEwbUqJtmGrmDZynyvzvSEnUNE4FtS8E/6a2pf11ABjbWeuwRBZcxMSMPrrcxHYW nNyA== 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=30sN7QPCl2f5+TxQYRNcc470C8xbnsS4dJL//uod7Fs=; b=KSrqW/NZ1PLcc38UxT7nxhBv8xPYLCliyywugoI4FqyIE9DoW6DtVTkqgnp5cRANhJ UBPGA451j09ehQ9xwYB3I7O5ai/i19t2I8MDhUSIxy5rsXxHWQXqn8GwXbflmMIFZISr R5OKNTZu/sXyRX8cB4FgdUmKyysHI2KFgLyW1oTV/2Q6Oo6jGRjHJ9PuQzayzZ1HlBSz T1iC/q4VOiF2Pulq9i8b9X8nPsc5Sf0CJZch27AZauzQrG+3+lYuq7koH0m6PM1PHLfu lP1Se6B1XPBkRVyZhdxI0P5OT8cZ1XlzMg/UZCVaI5u6fkePsmubVJLR46WCKnPhJF/D muXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VuXLWJQr; 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 l4-v6si21226882plt.497.2018.07.12.14.24.38; Thu, 12 Jul 2018 14:24:53 -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=VuXLWJQr; 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 S1732994AbeGLVfX (ORCPT + 99 others); Thu, 12 Jul 2018 17:35:23 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42517 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732547AbeGLVfX (ORCPT ); Thu, 12 Jul 2018 17:35:23 -0400 Received: by mail-wr1-f68.google.com with SMTP id e7-v6so3517357wrs.9 for ; Thu, 12 Jul 2018 14:23:59 -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=30sN7QPCl2f5+TxQYRNcc470C8xbnsS4dJL//uod7Fs=; b=VuXLWJQrFUPzrcMZDrVZb88vjxrpgFEBo5Ss4yS8eumfNaELOiK5ErLAWiiaDv3Df8 gNP3Dp78LyQSx3Wy4SyulWpsFfsij6sQ4t/lGOLQPsfDXMr+z/yTX8aVvBFmXAhafrPS ULK1xI8w+g12J8yGQ1IhJwwjiQgtCosDDLcTo= 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=30sN7QPCl2f5+TxQYRNcc470C8xbnsS4dJL//uod7Fs=; b=MeoOo8D1JU+MK8m22okApQ06G2EM51vThdJWdnC8Npici5sKLPvm+LxMJ53jC72QWd aq8VFXU0bfL8BI5XFwbOPuDaOcmAjpJCp+Nmmc/gzJmRbVyIcZHxWtCX7FhqGhK63P7Z 7V0zQ1+LV8a/D0hr6aURib6MahY8JARmGC84pQ5+Zcica0xbu13Ts1EjpDQYzjoKlKBX UjNz/ZggVkIUTSGfzyyOKk3vJwrKHL8sBagHELgBPzspHypjMXWbrZMilQCt225vT59L RvNoFDHft8j80S82pCl6KBV2mDE+KyXm2evo60mOFfzIlKFKVIiXMwINZP8I7ti0eAlw x02g== X-Gm-Message-State: AOUpUlErzR/gHKDhdYjywiq4mvtJo1VxXspWidIQcW3PcEi4s34B2nr1 3G/kBSmKEvcxeT9yA64mreETdg== X-Received: by 2002:a5d:438d:: with SMTP id i13-v6mr3082627wrq.156.1531430639059; Thu, 12 Jul 2018 14:23:59 -0700 (PDT) Received: from andrea ([94.230.152.15]) by smtp.gmail.com with ESMTPSA id z5-v6sm25889775wrv.2.2018.07.12.14.23.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 14:23:58 -0700 (PDT) Date: Thu, 12 Jul 2018 23:23:51 +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: <20180712212351.GA5480@andrea> References: <20180712175228.GB3533@andrea> <20180712211348.GA5308@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712211348.GA5308@andrea> 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 11:13:48PM +0200, Andrea Parri wrote: > 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 domain(rmw) & Acquire, maybe... Andrea > [the rest of your patch + the updates to the doc. I suggested in v2 ;-)] > > Andrea