Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1133868lqo; Thu, 9 May 2024 05:56:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8biQUMDcQ+EBAV7aOPHTn0uOZC/YVGgZzl9iNNN0yh9P2dNKA1+b+y52w25OzL8DhQ38JNJ/G1kqSjtqHMY/87AJYYJOoFI55mYC2Og== X-Google-Smtp-Source: AGHT+IF+IChdgjVjtR721p7M2r68T7ueJjJkxeDBcZ6NntiSZ0MCZG5Jje+nHf+ektDU6dTSNAnf X-Received: by 2002:a05:6358:998f:b0:17e:89bb:e545 with SMTP id e5c5f4694b2df-192d2e427b5mr623107855d.19.1715259411013; Thu, 09 May 2024 05:56:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715259410; cv=pass; d=google.com; s=arc-20160816; b=VN3EhzZ5bBChezMHjdJpFfvfP8WcUTTtwonAV/6DmofCq3wajhixqkFKsYFFb78l4G OAuk3vjpRO6GiDwULgGOsyGcOcd/5BvD9s4afnHdR6HRiH+RueYJEj7G1+Ol8rPOImQC KqdG9Ywpk3oNmp6WEeN5Xnjt+jNYpIHqnrkQVK41bo6vYH34fqt93GZfyvQgCE7Y2jve 5aiSFen5XLFOWQCAzaJSNVuOwi3/bUoJyVdtswFeBaw0tx+x7I/NJabFolvAfnkjnNgP cWFSzvoFHYewEbUBl3wi2kW1x0v29Oa8tJw/4jcyZKI8gmUR3UcHL44lyW3zn3v08zYL S7Pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=2WwOGcDMqILS0yxOjeZIx7XF+2CIIggoLPyQ2f7Lj00=; fh=uytTE/UPcuCOwFa+16medtvJDEo3ZSDXoxnqBZOMKbA=; b=aVCsMVJB6YkW9oWuYDf8cBd4W/WnFAi3fgdjW9mOD88ipI4Po71F6mE5jvCcFtjSFv RFgxQL2HqSm3DzEp2CUMZBKvpbnh61SNTNN828p1q2qrx7qwEzfEz2atC9n11rhV0GHq 5pRHkt6c3fTKZXKC2PchOtKJ58Ah3E3bMEPPdxPt4yikZLKHmoUN3oUSgTO+dZvB6W9G 6Wz5so0nFJNq2/W6An8J9fYbLyoo3vq11A1ELR8PjHqbSwRyJSFuKd0h0W4k/01yxW/s BRnws/QnYiD9B6Z1B1ktz/RoT47OIJ7kbroIsx4Osf6yN/K6rhbA/BbRIJcSEqsjg/wM Aaxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-174522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f7265si1413039a12.388.2024.05.09.05.56.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-174522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9AF74282971 for ; Thu, 9 May 2024 12:56:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9450A14B945; Thu, 9 May 2024 12:56:45 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19D3813B5B4; Thu, 9 May 2024 12:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715259405; cv=none; b=PpHvLrEdXTlsE+gOmfxqQgC6c0O6wa/TAeIIl3ga6dWZq6QywTR42eRkEV0r+PUehRlLDlnbDDUN/eNnHnxsU9fGA44fQgtRRQUZnSeVjHLdSpQcyjaffwQbcL7C/s/6OTr/gQAQ9dsFRr6Mb+x1/og8WSkA+XPZqwUtVisPGMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715259405; c=relaxed/simple; bh=wpigIbeceMTaY2F9pP4aAlMrmJa5Qg4mScZk+XYaoK8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BJZBxvHSG7VY6kCz2Ua6jL/cTqEfJhZibYC5v16OFAHV4AteWH9AIfi3f6QZtPe3/vDzzTyVyRdY0Z4x8DLcGFjXUx/pUCXlC5iRexnTiepOoBs9yy70apvcd3DztPpxFaH+ANey7aZVPUfFrwKxXrXNdFjbQWZ0DOIaZFKbtV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DE78C116B1; Thu, 9 May 2024 12:56:38 +0000 (UTC) Date: Thu, 9 May 2024 13:56:36 +0100 From: Catalin Marinas To: Neal Gompa Cc: Ard Biesheuvel , Alex =?iso-8859-1?Q?Benn=E9e?= , Will Deacon , Hector Martin , Marc Zyngier , Mark Rutland , Zayd Qumsieh , Justin Lu , Ryan Houdek , Mark Brown , Mateusz Guzik , Anshuman Khandual , Oliver Upton , Miguel Luis , Joey Gouly , Christoph Paasch , Kees Cook , Sami Tolvanen , Baoquan He , Joel Granados , Dawei Li , Andrew Morton , Florent Revest , David Hildenbrand , Stefan Roesch , Andy Chiu , Josh Triplett , Oleg Nesterov , Helge Deller , Zev Weiss , Ondrej Mosnacek , Miguel Ojeda , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Asahi Linux Subject: Re: [PATCH 0/4] arm64: Support the TSO memory model Message-ID: References: <20240411-tso-v1-0-754f11abfbff@marcan.st> <20240411132853.GA26481@willie-the-truck> <87seythqct.fsf@draig.linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 09, 2024 at 06:31:04AM -0600, Neal Gompa wrote: > On Thu, May 9, 2024 at 5:13 AM Catalin Marinas wrote: > > I see the impdef hardware TSO options as temporary until CPU > > implementations catch up to architected FEAT_LRCPC*. Given the problems > > already stated in this thread, I think such hacks should be carried > > downstream and (hopefully) will eventually vanish. Maybe those TSO knobs > > currently make an emulation faster than FEAT_LRCPC* but that's feedback > > to go to the microarchitects on the implementation (or architects on > > what other instructions should be covered). > > They cannot ever "vanish" because we are supporting every Mx platform > back to the first one. The M1 series will never have FEAT_LRCPC. Well, you missed "eventually". It depends on the timeline you have in mind but, say, 15 years from now there may not be many M1s around to be worth maintaining these patches out-of-tree (and they don't make sense in-tree either because of the lack of standardisation). > I do not think it is unreasonable to support this method when we know > what the CPU platform is and FEAT_LRCPC does not exist. If you want a portable emulator, you better start supporting FEAT_LRCPC* (I think FEX does this), ideally detected at run-time with a fallback to RCsc. Whether, additionally, you want to support the non-portable Apple TSO with out-of-tree patches, it's up to you. -- Catalin