Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp698992imp; Wed, 20 Feb 2019 07:31:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IbzJcrtAX04XGSxtmngv1tXXA5jvqAHhohaSXS7S4i2fcp9uTtxUgK4IjhWCshIZzT0EWrc X-Received: by 2002:a17:902:2:: with SMTP id 2mr38155723pla.228.1550676677325; Wed, 20 Feb 2019 07:31:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550676677; cv=none; d=google.com; s=arc-20160816; b=I8vZT1OOvA+hVkcHhOKLE+est9QNI5NpIJS0Jjl6IXagQHAepHYa25oOd5VRGYsTUb 3yrqAj2NP95EriR6+xY0bAKAofOSrYKvNbTqnC/IEgiOrampbtCZIXZFrmqyiW4SJHbn I0FjBpyHGe5fSE4HeaLVJ2qTXxVTe6von0gKsBgvfOkOJOQcRwdz6j88khSfqqkoDVYD BeQz1d/skN9eMbtgfj29TPsfCZiukNd5g/CaCY3zQTJrAN59eswlpAsxDPdCByQJmsTo viO/Uh9hKNSPmNOpj0wdDM1PftDjqtReUyFWBjBGXqvNA/jA6jjG+KocrsC+Qbmuq1hc Dj7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=416zxTk9SOga+PfZqHmBqns+5TxocPg/P4v5IwF+L4M=; b=Wp7afdBYqKpls9wAMBDnz/3VLekxeOKAlygzalaQp94aNQ4ErY2bJYgxzLnSFH4mdJ bbwoVN2LCeodKMjsifIWhLUXRCEmCc3ec69GxT21XCmvBVgXjtjm6yhHqna636kB6VVT WkzmGxaaGMXKhvqRkKbo6lxix/4gDyqgh4+g469C55Cuz2w0UvW7r5Qa/a+140mdAcn7 PMygUTXLkUmsdRQiCh2bjnIrv7/IIAYWl/MyfOKFqUp5XxN4+G/BLbewZTXf+JAv/dSP MHl/YdEk1KMl69nAFTuGCt64prFaDa5X/sykpqhm8MT9D9UMZnDeu02ZnD261CYogZ23 TuvA== ARC-Authentication-Results: i=1; mx.google.com; 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 s20si13590804plr.14.2019.02.20.07.31.01; Wed, 20 Feb 2019 07:31:17 -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; 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 S1727450AbfBTPac (ORCPT + 99 others); Wed, 20 Feb 2019 10:30:32 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:48632 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726627AbfBTPac (ORCPT ); Wed, 20 Feb 2019 10:30:32 -0500 Received: (qmail 3094 invoked by uid 2102); 20 Feb 2019 10:30:31 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Feb 2019 10:30:31 -0500 Date: Wed, 20 Feb 2019 10:30:31 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Will Deacon cc: Andrea Parri , Peter Zijlstra , "Paul E. McKenney" , , , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo In-Reply-To: <20190220134106.GA7523@fuggles.cambridge.arm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Feb 2019, Will Deacon wrote: > Whilst I completely agree that relying on the ordering provided by "dep ; > rfi" is subtle and error prone, having it forbid the outcome above appeals > to a hardware-based mindset of how memory ordering works. In the kernel > community, I would posit that the majority of developers are writing code > with the underlying hardware in mind and so allowing behaviours in the > memory model which are counter to how a real machine operates is likely to > make things more confusing, rather than simplifying them! > > IIRC, herd has a feature where you can "flag" the result of a litmus test > to highlight certain internal constraint violations (e.g. warning that a > data race is present in a concurrent C11 program). How about we preserve > the existing semantics, but flag any use of "dep; rfi" to indicate that > the ordering guarantees being relied upon are subtle and error-prone, and > therefore should only be considered for fast-path code? Unfortunately, herd can't really tell whether a particular ordering is being _used_; it can only tell when the ordering is present. Therefore such a flag would be prone to false positives. Alan