Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp655167imm; Fri, 13 Jul 2018 04:10:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEfvuf8LrKQ49b4e9zhMaLjMWHdcw2SFx26giW3KnrkMFasJY8DOhsITOcrhMRqKyC+KgO X-Received: by 2002:a62:c1:: with SMTP id 184-v6mr6664279pfa.100.1531480250135; Fri, 13 Jul 2018 04:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531480250; cv=none; d=google.com; s=arc-20160816; b=PDd0QqCk396cab6c6+k/6odPddsqvzfzy6pI88u4QvmVxQ0IRk3PIOrrcQiTuj2bJZ gLTUiOlshS1ki+xQ/iVJGCQqalSw4uio0ZmNAAlt6QLlwfsHerQZOFQgNkSku5TS3Jd6 8gOMTx/EQ7tUYXu/2CD4E/EJ6WC682Oj61Rp2Yj9YPtNhP7+LAdN2ulISr5sS75U8k0s IZCQdUVt6T9H1H7UGNXSbRORodqvrDRqg3M9RDIkmSqXI3oXa7UOX4IZTs8bhdfuu+BB ulRzXboGSHks8khbqcuROpNLVoin/Pee3C3udMfEMlJkBc4EJzVECkPP4tND8cBDJCQL Rl2g== 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=LK1lMaYvGAuJC8yzEKLN8/ei2zhXm+LDYeKU4YFEbgQ=; b=Zk6QBNE2EuKugjSyPdo+scM0muMCDew4Dwa9/bo2+sXVIKP957abTcl8fanLDCWyX4 OvCL28aWKsqTR/TuFZcfIkEVdogwhQxLzzXubmrbg2AxPLdnVLt/ak6lFVtX6SxTXUJz JKxabxWwA8UKtbvO1zBfFcOv1tBxfpQCStj4H1VMWmR1SbqdmuxrHlOg8djPhca9hMX6 jTlmAOxVvmvKSPG0DLujRGugRVLsKx4AcibnjSSm4KJcToWfNwSqCXB9p5qlP0x9zcDa jMHErkj51p8c2fmYUhNbO4GFVpz/HlyFoszMawiuz8t8k7eo4I/WPoN7hAGKuoFBPXDD 5NvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=gmmPGm+8; 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 k18-v6si23246110pll.404.2018.07.13.04.10.34; Fri, 13 Jul 2018 04:10:50 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=gmmPGm+8; 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 S1728187AbeGMLX3 (ORCPT + 99 others); Fri, 13 Jul 2018 07:23:29 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40424 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbeGMLX3 (ORCPT ); Fri, 13 Jul 2018 07:23:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LK1lMaYvGAuJC8yzEKLN8/ei2zhXm+LDYeKU4YFEbgQ=; b=gmmPGm+85vbV/9QPNSK0izc+z pA4D645tH3FLzdITvOi0yCQCsjzSMx04Gl46SOdafcG4a51pUdOUVK0i54t//pmCWCihXn25gmfep aeDmAx7OrZtGRIYhngQU2YMHuDp5lFpNUIfaF86zjjbtcPGRTa4zLG/bCeqHE8ZmqQvlHFtVOokS6 Q3ix1QH74zYMjnK+wTkraHPJnjdmh2y4PqmNQAoBFJJfYihEGf7rLre1ai/vl0LittlVHbv91o2ob SqgBMBtN5+PvyLCKFQAQsuyc2xDK4Ic4SeDG5uk5UT2y/Wn9yHn/SGDuXgx6rWsSf+uDioiKtgYMW Rzq15bFQQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdvwT-0006t3-8r; Fri, 13 Jul 2018 11:08:53 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C6F9D20298BAC; Fri, 13 Jul 2018 13:08:51 +0200 (CEST) Date: Fri, 13 Jul 2018 13:08:51 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Paul McKenney , Alan Stern , andrea.parri@amarulasolutions.com, Will Deacon , Akira Yokosawa , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nick Piggin , Linux Kernel Mailing List , Michael Ellerman Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire Message-ID: <20180713110851.GY2494@hirez.programming.kicks-ass.net> References: <20180712134821.GT2494@hirez.programming.kicks-ass.net> <20180712172838.GU3593@linux.vnet.ibm.com> <20180712180511.GP2476@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) 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:10:58AM -0700, Linus Torvalds wrote: > On Thu, Jul 12, 2018 at 11:05 AM Peter Zijlstra wrote: > > > > The locking pattern is fairly simple and shows where RCpc comes apart > > from expectation real nice. > > So who does RCpc right now for the unlock-lock sequence? Somebody > mentioned powerpc. Anybody else? RISC-V followed, because the LKMM currently states it is allowed, in fact LKMM is currently weaker than even PowerPC, which is what this current discussion is about. A number of people, including myself, are arguing for stronger lock ordering (RCsc) but getting the LKMM to be at least as strong as Power (RCtsc as coined by Daniel) which disallows full RCpc. > How nasty would be be to make powerpc conform? I will always advocate > tighter locking and ordering rules over looser ones.. mpe did a micro-bench a little while ago: http://lkml.iu.edu/hypermail/linux/kernel/1804.0/01990.html which says 30% more expensive for uncontended lock+unlock. Which I admit is fairly yuck. No macro bench results though.