Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp38377ybt; Tue, 30 Jun 2020 14:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAL4O5rXC+6bLdgcf9l2MYtRZyQWeyXvccfpYoi34zY7HQY1W7HD0r0BtnzGhh/tmfZ4up X-Received: by 2002:a50:9e02:: with SMTP id z2mr24361138ede.87.1593551553448; Tue, 30 Jun 2020 14:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593551553; cv=none; d=google.com; s=arc-20160816; b=PBjqKPEUQo88DzzQSNvljPaT7yaWRAYZHt/HVPPV1nushG+dpjTIqTjrjvhViq52qU AOZdDVgfvpxUDPu2LkwQI3iVSe4SU84ekf1lzt6WzpZAx5vTdNcpI1PR1O7v9Yail22F FXq3GVO607oSD6pqj125oL7goPgSF8GhJPPmEEXuQKl9BFQ7uWaSTghXaG7ax4xw6ebK BxKfhnDj2NTT5Yx6zGVwN0DuGsCn7zKcnyZMyXE7+semUEayDihTwhcHw2I5xjMHq6Bx H/JO9n7asdvP65T+qc9XXPo3VZOpf44VU+X3KzWUWiiFXBYyuaZCrKtfl4O9i/lsJtiY BYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pAld+PmSm3uQ9OLHyA9LsKDVn58a/UVYkn4lwoGnumM=; b=Sin5PFMHjO3ZhgDBXhSAnZm7V6L+ArSflPyxT1DRFRaPJyNaMZuFJj65BRsqyJE7Kd 6LulDcznFwuOtpYW9lqR9bAmMJ9nxP4u4OO7wgajUt4c7O3kiShxOQxvABTj0PuFBPlt QUYxEbrJlV0Wj+Yle5idE/QfInLqEHYt5Fg8FB5DyDeIBSz9M6+/TW6NtEuw+E4rHXBD ro0IGxmxJgC6MSny6jSC3Wj1ltVOVGy8RvFvOIETYmTekdZJjHjeGj3JtZgDkjW5lxgz lU92zHrso/9kd36V10L3lMYpmXKh4J8CUlewNwD6CGgpGR+TRAYdAaWZDkwqjz9ncdAA uq4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=eAS27j4l; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu19si2398661edb.468.2020.06.30.14.12.10; Tue, 30 Jun 2020 14:12:33 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=eAS27j4l; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729231AbgF3UV1 (ORCPT + 99 others); Tue, 30 Jun 2020 16:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgF3UV1 (ORCPT ); Tue, 30 Jun 2020 16:21:27 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFEE4C061755; Tue, 30 Jun 2020 13:21:26 -0700 (PDT) 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; bh=pAld+PmSm3uQ9OLHyA9LsKDVn58a/UVYkn4lwoGnumM=; b=eAS27j4l5VKQ8En/OF9eH/i5RP +zf93Ed62vvzDVNpm3OQPePdECVVSJpOKoPHPo0qto2p1L5df+7KSwptQDd/nIrdnpM5pzrhFjqJW Gay6KM35iiIdnoVMtvL/4zFrkRmS8yLmL8kAueTKNarZQya4QhxBswEHfzITY6U2oKozvVDs84Yl7 8YFxk3ukDS3ImbkleuGENzLAnxsGWZJK4RrZ92k+myKvwxG+jTKqc4UERDxZlwKgkAJCQy/4cc2Xk 2MFT8Aygu1X6cIf9AXIRkGnOEsa+DHSPoHT2y4I+azRP5RQAjvGtlG/6aByC0gvgXiSJN2XicZtSl 46R2yNXA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqMkd-0000sY-D6; Tue, 30 Jun 2020 20:21:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A75C130015A; Tue, 30 Jun 2020 22:20:59 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 850D8203A69CB; Tue, 30 Jun 2020 22:20:59 +0200 (CEST) Date: Tue, 30 Jun 2020 22:20:59 +0200 From: Peter Zijlstra To: Marco Elver Cc: Will Deacon , LKML , Sami Tolvanen , Nick Desaulniers , Kees Cook , "Paul E. McKenney" , Josh Triplett , Matt Turner , Ivan Kokshaysky , Richard Henderson , Alan Stern , "Michael S. Tsirkin" , Jason Wang , Arnd Bergmann , Boqun Feng , Catalin Marinas , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org, virtualization@lists.linux-foundation.org, Android Kernel Team Subject: Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y Message-ID: <20200630202059.GE4817@hirez.programming.kicks-ass.net> References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-19-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 09:47:30PM +0200, Marco Elver wrote: > I do wonder, though, if there is some way to make the compiler do > something better for us. Clearly, implementing real > memory_order_consume hasn't worked out until today. But maybe the > compiler could promote dependent loads to acquires if it recognizes it > lost dependencies during optimizations. Just thinking out loud, it > probably still has some weird corner case that will break. ;-) I'd be very hesitant to let the compiler upgrade the ordering for us, specifically because we're not using C11 crud and are using a lot of inline asm.