Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp150134imm; Fri, 13 Jul 2018 20:00:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdniuXi/U4FmGXYRkpPAK2w6Z94A6YyG+JeFWWm9mgUrB/b0v0tghWMQyfLyRv8la+Ow8Vh X-Received: by 2002:a63:da04:: with SMTP id c4-v6mr7892447pgh.398.1531537202056; Fri, 13 Jul 2018 20:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531537202; cv=none; d=google.com; s=arc-20160816; b=wUFKJmz/OyU7ZZ2HYx9WpDZkzEKO3wqshDb6ETtnxiyUho28RaugS1WI4vTEjM2gpf kaMRIhEKOqa/qhWzMEcZzGYcrbu547wB1pWuwpov6untIBW69XPETEjDnbtjbkNUGc1n fMb5XgIh1pTk5CJK8faCbja9U03RVbe4pTv96KWAH3hmSuKSGc5S8p0bRaN6MokvttAs w787USKbc7a9oF6eqOnc8JYk89Q9fdzguTKHmhZSfKaTdDUQnFXwWnlmV1+ENHqg4jVf /sESGHYFaI1wSPGYQl9u0NFFeB/mMwAI8sI/z9ppfZUIk22z1k3I/n8KR8PpnVQQ4vWh 5qWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=rIyp2qrK0Y3Ul1Av0RMnNgWR0nKZD2gx5DitEMTvRGg=; b=kesBQscK55gc4LCByh00E5H65aqEWgZ+aJA/TdB2ScKJVSz3CHE5nQGWZWFO3XCfu6 TE9oyAYrg2rbaVN5w5QndaW+GyC01BKihNPerqWBxsndGxOS3Bzsa2NRI7im0hOWCvYh m+lgIRWaHm/I5VU/8myutQ0+EsJs2QhTAYyMRod4dYChJdzdIHWHh8emQqN3+7+GaarA VgTETIC/d4wd6UTTSUR/ODYeSJVCVnKcH3Ams8rrDto8mmNQ3gOslUcU8RbQdOCjBqSt tBd8noS5al0Yum9n8aE5ZZKbSo7J4X0KM9530HUi4buZKVrcbAKktkg08eOrl9QX5CKB z6dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Z9aqTdax; 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 u12-v6si24513669pgb.280.2018.07.13.19.59.32; Fri, 13 Jul 2018 20:00:02 -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=@linux-foundation.org header.s=google header.b=Z9aqTdax; 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 S1731886AbeGNDP6 (ORCPT + 99 others); Fri, 13 Jul 2018 23:15:58 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:40054 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731422AbeGNDP6 (ORCPT ); Fri, 13 Jul 2018 23:15:58 -0400 Received: by mail-io0-f196.google.com with SMTP id l14-v6so23007111iob.7 for ; Fri, 13 Jul 2018 19:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rIyp2qrK0Y3Ul1Av0RMnNgWR0nKZD2gx5DitEMTvRGg=; b=Z9aqTdaxBcbLfVYXvoqCpo2o+wFBo11+E6GKIOchw/RY1+Q77kj5aMT4wLgIt2CBzc gZaS1CqKE7LXBERZk3uIBqNyrkpyzr+TeC+EFkQwNuZI5TIscaE1xwE9HdyRmDqM8/hM WIUJXlKAivBe3y6alDCNScTd6CN7qyZMDDsF4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rIyp2qrK0Y3Ul1Av0RMnNgWR0nKZD2gx5DitEMTvRGg=; b=kvEwivSAMIF/Yovi82MZ146PtMN05CqbgUNOktUhRLmJnPvY3xv7jvPzMbP+WWh1Vj X03tkSu9cLIF/CeyMJjPsGJx8wlyibyrAXK1FYo9YupH0GxLKGNzaGKzYJ/J+Fzs0847 dB+NKS0TxZb6N37CqOBH11qtocxLjyvr0UvNePBC7rsxvvkTZO7a/RkTJI/exbyppBJA 4g+ldcR2iq2SocZZRJIPprhMcP4+WvyV+MG7hsMimOoM2Cpos7NhDi2NDLo8EueJH20q BeARWM6/hJcuS5vWT2WTluwadXOByVkXjzAihy4QY0XZVGNjnqrxZV7thxxRPZjJ512v s42Q== X-Gm-Message-State: APt69E2sd/Azo3gtW84l0hMyabsOZBCcoaZL6n3HwLcghDHzR17P14Dw qt/OMRkVGcbTyN1JHq1ANB4LFgwNbQfP+C1Fd0c= X-Received: by 2002:a6b:7a05:: with SMTP id h5-v6mr18383510iom.238.1531537116949; Fri, 13 Jul 2018 19:58:36 -0700 (PDT) MIME-Version: 1.0 References: <20180713190638.GA4269@andrea> In-Reply-To: From: Linus Torvalds Date: Fri, 13 Jul 2018 19:58:25 -0700 Message-ID: Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire To: Alan Stern Cc: andrea.parri@amarulasolutions.com, Will Deacon , Daniel Lustig , Peter Zijlstra , Paul McKenney , Akira Yokosawa , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nick Piggin , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 13, 2018 at 6:51 PM Alan Stern wrote: > > The point being that the scenarios under discussion in this thread all > fall most definitely into the "Non-standard usage; you'd better know > exactly what you're doing" category. Well, yes and no. The thing is, people expected unlock+lock to give a memory ordering. It happened in RCU, and it's happened before elsewhere. So it *is* the "pure locking" thing that ends up confusing people. Yes, you have some other access that then cares about the memory ordering, but this is a fairly natural expectation to have (considering that we've had the same issue before). Linus