Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1029766rdh; Fri, 24 Nov 2023 03:55:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQzONNjlwnlHgyyYw7ZncurgrK3kFAhcl5g5oNq8QA7qB82wdxRPHdGdN3UWoBHG9hlbRt X-Received: by 2002:a05:6830:1310:b0:6d6:47e5:af6d with SMTP id p16-20020a056830131000b006d647e5af6dmr2556344otq.13.1700826919065; Fri, 24 Nov 2023 03:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700826919; cv=none; d=google.com; s=arc-20160816; b=I1gnJozynkGenl/XmQLQoSOknkE/kV0uAEhPMUZm8LiriwSzyyVRLcoCmpufo2yoSa TNqIxzrICIQnlPqlxPuBbWUjxopO3mWn6h3SE5H00T4115bRT2Kw6jJR352aRtMopyO9 I+1s+9hlmxOnkYggkVFUJu8v/ZQV/9jgCWb+dlJ5A2JOjQoZWCyzl3G8pHKR1vecHEOq pTaNilC5ccOzDk6P9bvHBQZtR2DtZY3Y3JmCElNV4Dzn5fprUNCVdsnUQEp+nnEXevqC M6lVe+Q7wJ2kEKbLLkInaGOYzrvsIxgRG5KZDLxPtmzRs/FuPpif89sVdytfyLvriK3s wKvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7/9ELPCZSyNtTedfYVN0RIERqDSGzyj/VTh+0OOKOJ4=; fh=Bky22Yxr6C+pIy1zLNULGvjnWgb2O3N6cxgbYvN2H18=; b=vO/ZsRI0+pZp+DF/0ieOXKW5FLuGo3eyfIhSaOO/8cnUUtH9WSMCGtBfc2JxMMcSD5 wX/nbCKvZsf6Wc6Eyt3AyXwq23WrRfnUzFbnne8sWZhC88ZcM4AptSAk/kQB3S+gfM3+ RfDf+dlfweRztjDaroFsU42qPT0Sh8k0tBjQe9+YTe2M6ma1fl+va6mn1VZ3ej0K1ZJj svdvyWtImeVePldYT+9thTCXUKjeq9PiRCm6F5LBrTqJG2XcT0kUiwxB5XepXq2Lx17g XE8e05hlAgwLY1eYM15/zARa+qludmP3mmri9IimpqieLO3eLqH/rrvYJvYcZKo5z9Ab gDkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Gqm+SH2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id p6-20020a634206000000b0056513361b4fsi3302125pga.741.2023.11.24.03.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 03:55:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Gqm+SH2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B54C1804912B; Fri, 24 Nov 2023 03:55:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjKXLy5 (ORCPT + 99 others); Fri, 24 Nov 2023 06:54:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbjKXLyz (ORCPT ); Fri, 24 Nov 2023 06:54:55 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C548E10E0; Fri, 24 Nov 2023 03:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=7/9ELPCZSyNtTedfYVN0RIERqDSGzyj/VTh+0OOKOJ4=; b=Gqm+SH2WxYC3SW6jehiqHEIGvx onKuc1sq6cP7JYqCQV6I+k3G+jf98LkqC9B3LwKbgLMdVmBHLwLlEv/AGXM2juldAAUNh+/+Ifia3 fjZe0lqpVvdtm+F+QoWzePxPpF+WHQnoTB305XXBJyQLbB9dNgFiunMC7PtaqJynhX7bXUDVkgybK tp029/O+KPQ1PiTV/JUSbhwK1ia7A/XvEG/q632FVmhOyfHIxoYpyiGh/MB2MIEGw6+6eWQwVBJNa E5CYY1M/QHrPtjv7Cu6Upz2QHzs/SFLveqZO6rIX148LBb/akZPQ+ZK7VhyuNsfhS6tn6s4CJEN27 WO4O9WCQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1r6UlU-00DsrU-3A; Fri, 24 Nov 2023 11:54:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 86BF03002BE; Fri, 24 Nov 2023 12:54:30 +0100 (CET) Date: Fri, 24 Nov 2023 12:54:30 +0100 From: Peter Zijlstra To: Jonas Oberhauser Cc: Christoph Muellner , linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Andrew Morton , Shuah Khan , Jonathan Corbet , Anup Patel , Philipp Tomsich , Andrew Jones , Guo Ren , Daniel Henrique Barboza , Conor Dooley , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Alan Stern , Andrea Parri , Will Deacon , Daniel Lustig Subject: Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support Message-ID: <20231124115430.GS3818@noisy.programming.kicks-ass.net> References: <20231124072142.2786653-1-christoph.muellner@vrull.eu> <20231124101519.GP3818@noisy.programming.kicks-ass.net> <59da3e41-abb3-405a-8f98-c74bdf26935b@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59da3e41-abb3-405a-8f98-c74bdf26935b@huaweicloud.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 24 Nov 2023 03:55:16 -0800 (PST) On Fri, Nov 24, 2023 at 12:04:09PM +0100, Jonas Oberhauser wrote: > > I think ARM64 approached this problem by adding the > > load-acquire/store-release instructions and for TSO based code, > > translate into those (eg. x86 -> arm64 transpilers). > > > Although those instructions have a bit more ordering constraints. > > I have heard rumors that the apple chips also have a register that can be > set at runtime. Oh, I thought they made do with the load-acquire/store-release thingies. But to be fair, I haven't been paying *that* much attention to the apple stuff. I did read about how they fudged some of the x86 flags thing. > And there are some IBM machines that have a setting, but not sure how it is > controlled. Cute, I'm assuming this is the Power series (s390 already being TSO)? I wasn't aware they had this. > > IIRC Risc-V actually has such instructions as well, so *why* are you > > doing this?!?! > > > Unfortunately, at least last time I checked RISC-V still hadn't gotten such > instructions. > What they have is the *semantics* of the instructions, but no actual opcodes > to encode them. Well, that sucks.. > I argued for them in the RISC-V memory group, but it was considered to be > outside the scope of that group. > > Transpiling with sufficient DMB ISH to get the desired ordering is really > bad for performance. Ha!, quite dreadful I would imagine. > That is not to say that linux should support this. Perhaps linux should > pressure RISC-V into supporting implicit barriers instead. I'm not sure I count for much in this regard, but yeah, that sounds like a plan :-)