Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4098256imm; Mon, 25 Jun 2018 09:40:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJLOA04Xe4aypr8uHM6hSYDKYoYi9z5aCJmYz/mbWuS4XYkiqUNqPCyO3/USynWtyJbAULW X-Received: by 2002:a65:6689:: with SMTP id b9-v6mr11349566pgw.326.1529944847398; Mon, 25 Jun 2018 09:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529944847; cv=none; d=google.com; s=arc-20160816; b=SNxGFqiAJpiBrhwTK9xC3wRJFriF3bUpANSlsfkD6+TVfwfWpW5ihnZ8O8+9KXu+go dXst/rBDOkT13jhQnjAG0TVAhdUeExvPIbxxtqyWc7LDZm3HuyPBm6/uhHPub9KmSOdm U5HBPI+QqAZU1jeQHwOXI6I8WrD9MvgNfp3JwBKqw4qghKEekz86V5R66Hq32HFB4u1h pnraWSe/3zM5QyFf0J6HlQTqhf4oe8gl62H0X8T7czbBicWQ8ybTVX1kSlJTGlEozZwi 2dCFmQK6aAgcKchCfqSuUmAe6Onaa9Ey7cPr/ogGlDyE7uIoQViGOT5vPGI4w7G6Wn7l waRw== 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=00lWR76EPRxqdazQnRbTEd2SjXK+alBJSlw2sX7RI8U=; b=qhQysavxM0n/lDYOTPqRQTTeQfkouRik45nb+girm3KkcxgqtrAALlrVbljfvuYfxl qGkCUQsVMSS/2naQ9RKLrw1JzJcjTfqUDWcrqliPFTCoCuMRXcJZYk9viXpHND92qN5g 8QFLTqtuUhii76aOih68ceesJWRW8HBjTyCRQ2VaLqlx5o7JwJhBKOHvEFhljF6uadS9 E4efIJVvoH6jq98Z86pVF+iDYwwadjkkLHvWVGZSxBGjF18BN3yVIm5WzQizO/tysjFS qk6JVCS//qBOyyHLc4j8XYbWcbNYUNrOhpRO4F14syZ7nzz+Y0aeAGxIPSEOcfe+GN1a AKww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fKFU9Tuy; 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 j5-v6si14990825pfb.244.2018.06.25.09.40.31; Mon, 25 Jun 2018 09:40:47 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fKFU9Tuy; 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 S1755134AbeFYQio (ORCPT + 99 others); Mon, 25 Jun 2018 12:38:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46006 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286AbeFYQim (ORCPT ); Mon, 25 Jun 2018 12:38:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=00lWR76EPRxqdazQnRbTEd2SjXK+alBJSlw2sX7RI8U=; b=fKFU9TuyPIr+Urmvgffe0+fSn ufXIqFKUvlM8Kf19g4tuwyCk0u5k7p8jHuuAGfiqGlFOfytRAFYFqB3mn+vkzpw7m3r7+Wn30XxHM rEyIB06c9AfsrS7soui99cH8XoNxqSztPKOqVPvgujMcCma5J1lk7ziIevj+87t+fOkAmOICGZxiw KHlcB70ORs7d3Vh5VnkNyDp4K9acczfpsj0YmU2No5S2+P2GmqzVkgb6fewfwBdnvX0xSVM3GFbiw csrjp+n14rzzLezqbzYCrUCJzdhl+U8QwiNsLh2xCrrFA1XaKLLidW7y0mdtSleQmlDR62WpxzJmQ 1eoWRxbyg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXUVa-00049I-D0; Mon, 25 Jun 2018 16:38:30 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 955872029FA0A; Mon, 25 Jun 2018 18:38:28 +0200 (CEST) Date: Mon, 25 Jun 2018 18:38:28 +0200 From: Peter Zijlstra To: Daniel Lustig Cc: Andrea Parri , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Jonathan Corbet , Ingo Molnar , Randy Dunlap Subject: Re: [PATCH] doc: Update wake_up() & co. memory-barrier guarantees Message-ID: <20180625163828.GV2458@hirez.programming.kicks-ass.net> References: <1529918258-7295-1-git-send-email-andrea.parri@amarulasolutions.com> <20180625095031.GX2494@hirez.programming.kicks-ass.net> <20180625105618.GA12676@andrea> <20180625123121.GY2494@hirez.programming.kicks-ass.net> <20180625131643.GA15126@andrea> <20180625141830.GC2494@hirez.programming.kicks-ass.net> <20180625145611.GA16333@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 08:44:14AM -0700, Daniel Lustig wrote: > RISC-V is (other-)multi-copy-atomic, so I don't think transitivity > should be an issue here. Ah, ok. > We do have a "fence w,r", but we decided to warn against actually using > it for a few reasons: 1) lack of known common use cases :), 2) IIRC > there was some corner case discrepancy between the axiomatic and > operational models if we allowed it, and 3) in practice, it's already > both expensive enough and obscure enough that many or most > implementations will simply just treat it as "fence rw,rw" anyway. Because the majority of the cost is flushing the store-buffer in either case? > So, in theory, "fence w,r" should be enough to prevent SB-like patterns. > It's just not yet clear that it's a big enough win that it's worth > creating a new fence macro for it, or pulling the current RISC-V > recommendation against its use. What do you all think? It was mostly a theoretical argument for why smp_mb() is too strong, not a real practical desire to have w,t.