Received: by 10.223.185.116 with SMTP id b49csp612151wrg; Tue, 20 Feb 2018 05:04:45 -0800 (PST) X-Google-Smtp-Source: AH8x2273cp1pioGJmXj+SONdDcSEx5GoLKKCxuyb8F97Q5cTY1bkU8OAt/CiNnVLCmnMl10Z/StO X-Received: by 10.99.108.72 with SMTP id h69mr14843698pgc.302.1519131885678; Tue, 20 Feb 2018 05:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519131885; cv=none; d=google.com; s=arc-20160816; b=UVx9x19uJs6oZQaULwhTtaXnZjZIfJwo4HQYFpIaxPscuzj39SjMH95zLNJ79fr/KG t3IP6OjE4WW04NwsnQ5Uym54aL//4/h5GXIt6S965x/uklCx7MCGIlyxWx1TLDUz8xvn at1VWeR4o699sJX7aYhCUzSr6o3pjpL+DukVzruXVwWpU0KhuGcF43x0YdeXAz6MV83k 4DsgdKWd7vR6Do7DsFeZbOUNK9bInQ8WwdFdj6akH8K7E3mEDJApKBETWaejdI7G/uvY 1LwDXDTEkKpPirfb4uav1lqA+MyLuQThkG3mvMhDxFZAPzBETkix0H2bsYZCzIOaBIX3 tANQ== 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=oqgllHG/UpFOFYqVs8kUAVVyZBJHzYrmtNu+DuVrbUw=; b=f1S0JCkulZqasZ78/FsaFN2MTz81ctYUaMx948Lt7hd7fW+hD1y/H/ZEKTljc+0cqN EkEkEfUYevjfyyEJoxAS1pDB9VPBRI3NtDUSCdWtDDDiqBbmD0v2ENKRx2tHbRRxeehQ 1lIYDdAHJ7OX2KFlOlvjRrGtflnLZ1hujtlqFWCEXfNowHqg37o2GT8+1JizV9SWFILo bzedMYlIeETsxvOAtvHvN7rqbG2E68lLA6GhzlduGJtnkBmnCO/Gkq1eZppD7bmZ33zz RXobV476ogrhlPvhVu+W5t6ALcJofuZp0wYFpsrDYxXHEcsq8EU2W5J6L5LDBTou/WdW CX9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=UeY7bSwu; 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 r5si1266418pgf.434.2018.02.20.05.04.22; Tue, 20 Feb 2018 05:04:45 -0800 (PST) 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=UeY7bSwu; 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 S1752171AbeBTNCO (ORCPT + 99 others); Tue, 20 Feb 2018 08:02:14 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55478 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbeBTNCM (ORCPT ); Tue, 20 Feb 2018 08:02:12 -0500 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=oqgllHG/UpFOFYqVs8kUAVVyZBJHzYrmtNu+DuVrbUw=; b=UeY7bSwueEmRxR9xSJ+Hj//tC CsTOO4nMC/nPg1/B+GtIhWKDauUn6qFKS2fHAicBWhUiybnuyaDNfLJcqfMDb8HdevW32ty9AZ8x1 mfOJl2GPc4BrHHc9yr7MeAu6tqWaD53/kKm+OtYqvkEgywxKmsSGLqttB+0QHxMx6TgrsmguMrpm7 OYtrXD7oxVv0VjRCzYV6DpVzpQGFW4MVQQw/6A9E76GHG9ySLa20jZi81ig+UlhoYc7ZOb6sWmhYf ZDlScPkyntDIaOTFFR8rqld5PiyR+mejK7XNnw+Xt+IwPWfqfZJ7+OkucwNEWPAWKKQP0pGX+229g LKm8vFBtg==; 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.89 #1 (Red Hat Linux)) id 1eo7YT-00084M-W4; Tue, 20 Feb 2018 13:01:58 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E96AF2038D44F; Tue, 20 Feb 2018 14:01:53 +0100 (CET) Date: Mon, 19 Feb 2018 21:28:44 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Alan Stern , Andrea Parri , Akira Yokosawa , Kernel development list , mingo@kernel.org, Will Deacon , boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, Jade Alglave , Luc Maranget , Patrick Bellasi Subject: Re: [PATCH] tools/memory-model: remove rb-dep, smp_read_barrier_depends, and lockless_dereference Message-ID: <20180219202844.GW25201@hirez.programming.kicks-ass.net> References: <20180217151413.GA3785@andrea> <20180219194123.GZ3617@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180219194123.GZ3617@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 11:41:23AM -0800, Paul E. McKenney wrote: > On Mon, Feb 19, 2018 at 12:14:45PM -0500, Alan Stern wrote: > > This leaves us with a question: Do we want to change the kernel by > > adding memory barriers after unsuccessful RMW operations on Alpha, or > > do we want to change the model by excluding such operations from > > address dependencies? > > I vote for adding the barrier on Alpha. However, I don't know of any > code in the Linux kernel that relies on read-to-read address dependency > ordering headed by a failing RMW operation, so I don't feel all that > strongly about this. Right, but not knowing doesn't mean doesn't exist, and most certainly doesn't mean will never exist. > > Note that operations like atomic_add_unless() already include memory > > barriers. > > And I don't see an atomic_add_unless_relaxed(), so we are good on this > one. So far, anyway! ;-) Not the point, add_unless() is a conditional operation, and therefore doesn't need to imply anything when failing.