Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp725114imm; Fri, 31 Aug 2018 11:30:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/tA6tOT+QHqFJu1TxpJVOEQUQPHKLvSNDI+EN5F5uLh3GX7qqFdj23gsKZUukdcQA+GVO X-Received: by 2002:a63:e206:: with SMTP id q6-v6mr15023376pgh.223.1535740219990; Fri, 31 Aug 2018 11:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535740219; cv=none; d=google.com; s=arc-20160816; b=s/q8AUyYH3PyYSK5Cakz8qIVj+e245VjkrJDownlCDct7ULW18Lb485aYXEf662Ziv EFThcsoCcqs3wYAlm3Y79bAAiVsu1Rx1BgAP+AL6qBMJAJ0xZRVJKk6V8Ttj7F78HU3j xNOjvHnL+4uGE5jLgKxmJ+vn3DloL/oEaSW5v17+wYhv5gp4dW8Qrd8WddyXg+8p5uQp mdFHmkeS7IGnczteZwFIvSKdvkSNLNkGBOdmCsOjdKUK9tAY1NV6orXIPKPDerCCoxNJ LjtxE2yBU2IQ2hj9/hnHIYPhguE6W+lFg1kLyZdeGhndhKqcZCyOfrJfd0n9Ht3bnQFc Dcyw== 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=5RVh7IwAYc0JOpzOkafhgYi8+eZzOj2onbG9Prc6MlU=; b=s+zTvmpMvQ7TlvNjAbvfqbE9RUCiqyWiu5Eo0CYS81x/nfVjKM/LoSbgmxyGjzhNXl TL5YGHM5vqsjwM2PZBTpBja4FrnIJMuRE9WMaOSunXHYJpWE3Xke+JBlFnuzXKPlFjPx 5xKCzEpLesx6f4xXiC6FqIBWdmT+H7vAOK3WG0dFFv6YrOPdddWf5YRFnLFfxu8TEzVN Z3FyCKEg/8028EoWvhUYWvL9bMkfL/CnrfLibkT9tUggUiWw03ZrN/MoiuetbiA9flRC imNVwat/VVtoDmWSPTdMNAgYFWG9NaSMD8M7hiGAqdX1yGb6bgIJpExNaE4bXkxYWJU+ s1jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OeAHd5e9; 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 s17-v6si10147683pgi.284.2018.08.31.11.30.05; Fri, 31 Aug 2018 11:30:19 -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=OeAHd5e9; 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 S1727337AbeHaWho (ORCPT + 99 others); Fri, 31 Aug 2018 18:37:44 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:41953 "EHLO mail-wr1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727235AbeHaWhn (ORCPT ); Fri, 31 Aug 2018 18:37:43 -0400 Received: by mail-wr1-f42.google.com with SMTP id z96-v6so12041136wrb.8 for ; Fri, 31 Aug 2018 11:29:00 -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=5RVh7IwAYc0JOpzOkafhgYi8+eZzOj2onbG9Prc6MlU=; b=OeAHd5e9XxJ/t7bIhiqcJkREkrgvBizB3NsDxChe7YtXHbKqrWEIYJUmcQK9vB0sp1 wMKAWdtwbJd7GRYo89XpQnuA3YXE/9TaQZzXWpK2fv4MjosfNbbQlLEYKmSKNbH+7Lu5 aV3obI8DzqZIM08rZ4KKhkmMzrv3xRyNXRwuA= 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=5RVh7IwAYc0JOpzOkafhgYi8+eZzOj2onbG9Prc6MlU=; b=ghszmpiwMNo3BO2YQvkmw050LZmcnEHgkDY2ODnTxC0N0d9z2HNAt/+YBYYbTTXO40 Kw2F3Fz2KIcWOXHikvcr6kZVksXdApBmgOnogyJR8bk5ysLONJxkRhBV0TV+pjqyO0ju 2nUdFQnJ24jjJu5RyETjuyMr05JROcUZuZahoLJMxZbzKLbyyj2TXazF6JLUOMrcLnoR p4scYj/a78ZUa6p9i1uiTqjP3QZbEVrJ4F1kV2ww7HFoaVSbhH0jp2lu3MB//HO5AQ7O +0FMylBD+1TKkMbYusdCdiDbnTti72ANoWbEX/z1vgdrH+RfLZSKKNNj3OR/wczjysEO 3bBA== X-Gm-Message-State: APzg51Bfni4jS1OszFb+qhuH8iVfcpd3GWTyaWb8pDsn4BS4KkvySutp HC+0vCCyaFZmJBWkdQtoGcVfag== X-Received: by 2002:adf:ae5a:: with SMTP id u26-v6mr3193527wrd.246.1535740139863; Fri, 31 Aug 2018 11:28:59 -0700 (PDT) Received: from andrea ([94.230.152.15]) by smtp.gmail.com with ESMTPSA id e14-v6sm7036706wrv.44.2018.08.31.11.28.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Aug 2018 11:28:59 -0700 (PDT) Date: Fri, 31 Aug 2018 20:28:46 +0200 From: Andrea Parri To: Will Deacon Cc: Alan Stern , Andrea Parri , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com Subject: Re: [PATCH RFC LKMM 1/7] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire Message-ID: <20180831182845.GA4673@andrea> References: <20180831091641.GA3634@andrea> <20180831160640.GG30626@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831160640.GG30626@arm.com> 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 > > Yes, it's true that implementing locks with atomic_cmpxchg_acquire > > should be correct on all existing architectures. And Paul has invited > > a patch to modify the LKMM accordingly. If you feel that such a change > > would be a useful enhancement to the LKMM's applicability, please write > > it. > > Yes, please! That would be the "RmW" discussion which Andrea partially > quoted earlier on, so getting that going independently from this patch > sounds like a great idea to me. That was indeed one of the proposal we discussed. As you recalled, that proposal only covered RmWs load-acquire (and ordinary store-release); in particular, I realized that comments such as: "The atomic_cond_read_acquire() call above has provided the necessary acquire semantics required for locking." [from kernel/locking/qspinlock.c] (for example) would still _not have "generic validity" _if we added the above po-unlock-rf-lock-po term... (which, again, makes me somehow uncon- fortable); Would to have _all_ the acquire be admissible for you? Andrea > > Cheers, > > Will