Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3461247pxj; Mon, 7 Jun 2021 11:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPw5gxGtcjuGKtKp19Aoq2f6MJeNPuDmFL1gF0xrVDu1orPcuBNMLfZiO8CDhO2736a7bC X-Received: by 2002:a05:6402:1046:: with SMTP id e6mr21422625edu.218.1623089377103; Mon, 07 Jun 2021 11:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623089377; cv=none; d=google.com; s=arc-20160816; b=pdn5v4anZBOvHQkQh87HbjyXyy8zDscmBd1Ikbo6NrEsPGEw2Oh3B9SwwXCEeqahIz eC2PBXsyaLLWRmbQ+HjoJgUGrWeTUFL7YkB8M6XXxQBMsoTHEiOpzQPVrbcPxPTX77O1 ga0GL3WNZQz777dE2iCsCR8K3OgBeI4jJQJ9IE4+1ihSHY7IQIu0zg1IWiKVbQx3okJG i7qG4xd+rGQQulha0L7wUy721aFOUhabRHlJpbKP5FB1LZcNWYdXCDY6beX3syp4kNrI FvjOGq2YBBT8VXmYa4eqfpHCJAgjKTJDcrPViLbewIz0Lrr20T63UnzFOKZwC2NwF5al p0rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=IM+p++xWnXQZtCbMr7wK3wB5YSOaGjRCyK6Aa3k+OEI=; b=T6YMcE5rBSIbd52UGkfIA15S2gSUdtyEIf563UlKJvJKCMB1N4eY9uuWvQzXUA2re/ 1r7Wv7LtH+eLT+wr0LxCnvEyEFRebRFodlEhc7Yn66SfBbBKK8dkgJSl9Sm4eegIq+l3 03y6uFjnnvAEo8ACpnxLfCLeXSn8BcICL2bqZoNuNIykANubEyovGFAio2CyQQ66Pzc0 Ja9Texbo4gXUXPOCcCKjyPEQR4omgzPjl+xJmZVUVoxttw3Ez6b2mROz1Y+OAn5dbdhn 2rvwvuPxTBK7ccZVm8an6t3dDEZmrcFmSWsrix0+Gp0IZiLVIter64sSryekcWO8TSDG Up2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j27si9977492ejo.342.2021.06.07.11.09.12; Mon, 07 Jun 2021 11:09:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbhFGSJz (ORCPT + 99 others); Mon, 7 Jun 2021 14:09:55 -0400 Received: from mail.ispras.ru ([83.149.199.84]:57022 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbhFGSJy (ORCPT ); Mon, 7 Jun 2021 14:09:54 -0400 Received: from monopod.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 5287940D403D; Mon, 7 Jun 2021 18:07:58 +0000 (UTC) Date: Mon, 7 Jun 2021 21:07:58 +0300 (MSK) From: Alexander Monakov To: Segher Boessenkool cc: Linus Torvalds , Jakub Jelinek , Alan Stern , "Paul E. McKenney" , Peter Zijlstra , Will Deacon , Andrea Parri , Boqun Feng , Nick Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Linux Kernel Mailing List , linux-toolchains@vger.kernel.org, linux-arch Subject: Re: [RFC] LKMM: Add volatile_if() In-Reply-To: <20210607175200.GG18427@gate.crashing.org> Message-ID: References: <20210605145739.GB1712909@rowland.harvard.edu> <20210606001418.GH4397@paulmck-ThinkPad-P17-Gen-1> <20210606012903.GA1723421@rowland.harvard.edu> <20210606185922.GF7746@tucnak> <20210607175200.GG18427@gate.crashing.org> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Jun 2021, Segher Boessenkool wrote: > > So the barrier which is a compiler barrier but not a machine barrier is > > __atomic_signal_fence(model), but internally GCC will not treat it smarter > > than an asm-with-memory-clobber today. > > It will do nothing for relaxed ordering, and do blockage for everything > else. Can it do anything weaker than that? It's a "blockage instruction" after transitioning to RTL, but before that, on GIMPLE, the compiler sees it properly as a corresponding built-in, and may optimize according to given memory model. And on RTL, well, if anyone cares they'll need to invent RTL representation for it, I guess. Alexander