Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp487192imm; Sat, 8 Sep 2018 03:00:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZSYr8HZ1lIU3VrUTUHm289XqIyTi1NtMwKgj5ovLxEymtdpya1v9fL09E5s1UMuB4B11pb X-Received: by 2002:a65:5a81:: with SMTP id c1-v6mr12636734pgt.120.1536400830020; Sat, 08 Sep 2018 03:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536400829; cv=none; d=google.com; s=arc-20160816; b=bn2GDQfF5b/aL1S/DGw3HRGCq6rRI4F9FgrFRhNDZSZIp5qYSiGxqVP7Qh19b8DAMJ b7fCYlWox5sW2cZq05+uJz0XtPAXuKJTfdVvy3Lb3RLn4lAdh+TECyKfyDz/+yysvyqT OGl7TgKMV5g08QNZG62T6iu2IaNHt/LNlguO3tcIw5jUysE60Qxewo9hSs88uIIBaodh RDcKVaJeIqoC0HXUddc9CjX2L4Sjvj6vKrnf64GUNqgGdXKNyzUvtV8kqfr/WKJAJwB5 Feez1cRD746vzTCKOv4WSSgPT5FzxsmQkIQzrH3hxtDIBPrqDLs/BsVffJ0UEXvxAp4T 8Fcg== 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=bFBAOxMrM35yrh7ri5v+LG8kkJ5SoJ6ayi0r6ggM1rU=; b=wjno7YOZZE41O19i+hBSyU9304WxcG3o4Io+sRKikoxVp7o4EPh/OG3mk04t6Byh+f cqbkmJooaQ4n/Y5znQVxguDXzz2tKwO15sU0i7IQRVn++LIHNZD9cF1x4bL0WKlSr/az 6aeDVSMkR04kb+QSK2QFPY/KMzRQY6vN9kVVss3GcZwLdcP7u4iB6B0hvci/uOiQHRG6 49vrjTHrdiffeHrs2ykk0jSlxjl/lbs69NYwoPOq49BEcv39Ize7f6wfdlqQXTzslz09 qjkXLIvTD1cadXVikUGQQz12tlHRYGOzMMIJkEUv7UI042OKQ37tviOPlxYPUvcBHFNM r67w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ceNtWdzb; 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 y5-v6si10038988plt.438.2018.09.08.03.00.12; Sat, 08 Sep 2018 03:00:29 -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=ceNtWdzb; 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 S1726593AbeIHOoP (ORCPT + 99 others); Sat, 8 Sep 2018 10:44:15 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54118 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbeIHOoP (ORCPT ); Sat, 8 Sep 2018 10:44:15 -0400 Received: by mail-wm0-f65.google.com with SMTP id b19-v6so16906557wme.3 for ; Sat, 08 Sep 2018 02:59:02 -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=bFBAOxMrM35yrh7ri5v+LG8kkJ5SoJ6ayi0r6ggM1rU=; b=ceNtWdzbEoIryvZ9PX9C9+cpmXKEPSoXOGvcBdOMYx2I9s/dxygdgYvxmfiltmzx5+ AZzkCLNxul0fAacOidCeNqg5NO8oEwDYY65549Mwo0HsNzyk4SYI7t9d8jueTuGyYL6d pWtCxy+s4OGHKJEgUp+HSJ7/MXBrzMM8H6gJk= 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=bFBAOxMrM35yrh7ri5v+LG8kkJ5SoJ6ayi0r6ggM1rU=; b=bGv/uAHqK0xSiIJu+5uvI65CaAZ0eahExENkruaslpItyo/kzHE1jY1dnd1A+utOHl 4pJnm5ulbISfAIBMKrTixFLq/9QELSLj3Kwuq8LWVE7Gpolvi0WvSeoUcrp496g2S8rO iqnSKVYjOHc849CqtTKftgGIQ3vtSsKOBScguN/c20V1sifTCAaeHNOQ7J1v8XU54DNI DSXZFVDYZdWEbskoxyKHOSnSK0yZwiYIijprYmKFaEP613KaCoifenHUu/zYOYdvpfOf JIPnMUjcvDympUtysaL0T8OE/x80tGqQlrYyku3wfcvVELo6Vp3vg9T3pd4OPhlHQ2NH 9DCw== X-Gm-Message-State: APzg51CmLLhvUIik/e5bVwdD/xzuVbXQPWEpUsAEoYgBzRen5PpBfr8W Xq4N5cGKn64sJZqvKDCPWsiPSg== X-Received: by 2002:a1c:98cc:: with SMTP id a195-v6mr7550032wme.64.1536400741951; Sat, 08 Sep 2018 02:59:01 -0700 (PDT) Received: from andrea ([94.230.152.15]) by smtp.gmail.com with ESMTPSA id t69-v6sm7789069wmt.40.2018.09.08.02.59.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Sep 2018 02:59:01 -0700 (PDT) Date: Sat, 8 Sep 2018 11:58:48 +0200 From: Andrea Parri To: Alan Stern Cc: Daniel Lustig , Will Deacon , Andrea Parri , "Paul E. McKenney" , Kernel development list , linux-arch@vger.kernel.org, mingo@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, Jade Alglave , Luc Maranget , akiyks@gmail.com, Palmer Dabbelt Subject: Re: [PATCH RFC LKMM 1/7] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire Message-ID: <20180908095848.GA6272@andrea> References: <20990a3f-1507-c98b-f14e-2f5241319d8c@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Will feels strongly (and Linus agrees) that the LKMM should not require > ordinary acquire and release to be any stronger than RCpc. > > The issue that Andrea raised has to do with qspinlock, qrwlock, and > mcs_spinlock, which are implemented using smp_cond_load_acquire() > instead of RMW-acquire. This provides only the ordering properties of > smp_load_acquire(), namely RCpc, which means that qspinlocks etc. might > not be RCtso. > > Since we do want locks to be RCtso, the question is how to resolve this > discrepancy. [...] > To tell the truth, I'm not aware of any code in the kernel that > actually _needs_ RCtso ordering for locks, but Peter and Will are quite > firm that it should be required. Linus would actually like locks to be > RCsc, but he recognizes that this would incur a noticeable performance > penalty on Power so he'll settle for RCtso. It does look like Will, Peter, Linus and me could help you put together a satisfactory patch description! ;-) I'm not sure I agree with all you're claiming/concluding above..., but again: why don't you try to collect what, in your opinion, are the relevant arguments/comments from previous reviews of the patch (which, unfortunately, goes back to July) and then send an updated version? (I do have the impression that these discussions would have been much more "easy to follow" if you only did that time ago/with higher frequency...) Andrea