Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp134531lqh; Thu, 30 May 2024 17:11:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1VEE2p+vp1VRHD2gB5ZyGOtWsyieV/Utw75+oGAIOdSQKlQMREU7mfF0KHsv+jqfaV29EOc8HN0Nc9qTuszuFmgVR7+/aWij/fNrtSg== X-Google-Smtp-Source: AGHT+IFqVuMTKe8LqnpoJG6GLhsR7bdAFZfG5gWo6JbHajwRFECDLOsmVkCf/t/GX92OGyJQrbCy X-Received: by 2002:a17:906:3555:b0:a67:5514:841 with SMTP id a640c23a62f3a-a68220486c3mr15117566b.68.1717114289455; Thu, 30 May 2024 17:11:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717114289; cv=pass; d=google.com; s=arc-20160816; b=auWolz366Ok5ExAEHmlbB6kbASRup5c91R8+6zE6cGRAun3b4P9Owi2FQHGE4gVxxi Fv/Tn3qp3Zfj3k2J6DIQMgPeRlZyz7zQ727o396Po7SUmDiXzGCR8+MieL2insBcc+OO QCXQo76enirXQHlKrEaetzoXJL5rZd+rumYkTUIN2K0QVDzT+54GOVpwzAuTwlyF+B5G uP2YwJTUf3RPZQ6YUE9tZRrEVVdhk37gYb2WMdva9N09KEWAtnBmxV33mefL7+FJBGus xBz1uLYScxwZIW1w8gmx7GeS8OhDJ26Vptx6o32xOFJih6UGzMurc7mWZTcbOq+Xe1yF JVvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=YHMYrW+TpQb5zcHr1paZFxtLcsiCfSjdSb93AnO8N4I=; fh=owUSMdA0pjtApzo9+wa+BsWThLayX8pBz4q/ShfXCBA=; b=0XQtiJ7YuCc7AcKbjXSywpqxB7sB4e2Ps5oH1EoWoMONPhIAZSuTysGqCYdv4k888e IxZqn5RXBRAuRTm4i00m2t33fCTbwGdEzWYGP7VVRpyRjCMn+hsHHfiNU95reL/f56nC C5Hd5z1HoyZIiBFD07OT7FzOlSwSQuVlDvCTwa3U6G2PG+VGh+sjPPzfaHztasepPxQA Tg8sD0HE/ea68f72ytwFQuI2OvWHrckUdo3sKUtea9VrfvhOFW0sD9pNavBtc3Xov53S WBeG2M5Eilyl1dOkR4VnaJaYH06qxalBDH5IKw1yD0F4BUQv6eEMntD9KMWsP9+zc0NO ejpA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GKchJLAj; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-196064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196064-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67eaf65280si27048766b.801.2024.05.30.17.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 17:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GKchJLAj; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-196064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196064-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 071B11F24694 for ; Fri, 31 May 2024 00:11:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9E50EC0; Fri, 31 May 2024 00:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="GKchJLAj" Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99A4115C0 for ; Fri, 31 May 2024 00:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717114281; cv=none; b=aqwao9ZCnknIPeEzJbdL2I+56tRhHxxbX8Z5vzDBLx+vt7hdQxMZ4cRML23S7j+0R1yW5hJJuRxTTHzHmrnDkz8QWAoVajGJkA1eO+2zh1D6I4iwWqKk3ULQRgCA/xXVPM4QtSz9VRXBGeMWGRWFe4aijKj/aBV7H9avoTfTQc0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717114281; c=relaxed/simple; bh=U0XJns+YNNmeMEASPduEJ9jHIdS9fQwGg1OuH4qRsww=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=k4fupW1Ko8JH9p2DIWdVrxf/zww0b3gpWttfDyDJKu0nxrTNbTPtfLrgeCDZXhouhBbcahEAt/T13YdyCYQxujCaq1YEZnZdgsAp8EClaxS/3d3lUTw7D1cjLTAx/irFnwudXuOzvdughXAE1XKU3Osv0IrT3umsqglNkNjOzIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=GKchJLAj; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2e72224c395so12969681fa.3 for ; Thu, 30 May 2024 17:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1717114277; x=1717719077; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YHMYrW+TpQb5zcHr1paZFxtLcsiCfSjdSb93AnO8N4I=; b=GKchJLAj9vw4sKbRtxyZEpHnh1q49FIPluJHKYkljzG458HRJ+PkGJDeOuR6mqV3EQ BJDmyT0KkZVSpWHNhLVrH/gcJv64pMrezDpnvBm7wpdIyLMsslzJFSy3X71oDFko//Jk FbrTakHlClf8E+P5Zf9wUSXVsLaMfNw8Wg86I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717114277; x=1717719077; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YHMYrW+TpQb5zcHr1paZFxtLcsiCfSjdSb93AnO8N4I=; b=M4IBMpAKY85jxiP1XaKXO2/RNsZKkANWu8ANF+2whdaplWAlYeFb5vkurOIB/5NBEh IZeKETTHAa0PWxkf6s01xDFkDMl6HMLKLVO2vTUcfpDw1ViBBjrwBYd7/rK19YeykTi9 CFIoBCYYPtQ9QMS/9XbfqvmJemVcB0hldKoo/f7MUEketvoTIuvna+LTekf+pAj1eE7Q JgNRPcSoFmqsuhEy87PpxSPDc7EZcYt772rpOzU/65Lr0Ui3VjIdXaSoAp22UctxXr9X NkH4X7Q/OVEfKi0WNrFy0FY4ENnIIo6qXufzTrn1jVXp7S/UNUmwp/wo4pr+cNEQv7G/ SJNg== X-Forwarded-Encrypted: i=1; AJvYcCW/aCAZjjx1yyCFsnzzydYzfYXN3HzcwzLJXdZmDg2EKBX7dCniaU0cUsGssgOHjBWynVP6d0wt54eJ2E/D1SoqcIeBNiftIZDVYhqk X-Gm-Message-State: AOJu0YwBst1zqGJLOZZaNHIyE286tzI+DBHS4N9cAeshPzXS0hdrHvXx 3H7rxJBSdzi60V4M7nRgmv/mv1bNbT05tW2Z19At6CvDe6Hykzmv1WTxhkeX3pZg1sEmb5pSufW 56Y3mKA== X-Received: by 2002:a2e:be1f:0:b0:2ea:7cc3:fd40 with SMTP id 38308e7fff4ca-2ea951d2403mr2319161fa.45.1717114277348; Thu, 30 May 2024 17:11:17 -0700 (PDT) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com. [209.85.218.42]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31bb825esm353571a12.32.2024.05.30.17.11.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 17:11:15 -0700 (PDT) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a6858bdc9ddso502766b.2 for ; Thu, 30 May 2024 17:11:15 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUSGyIMfEFZkT1sXvILkk3tn39dxBmibSY7KLtrCH3Ly3PFv9f1SmIu8tNhvP2tH6jHz2xZQb2pvDGpsTO3S2z3cftB0GMegpRfUNxS X-Received: by 2002:a17:906:258d:b0:a5c:dcd4:351b with SMTP id a640c23a62f3a-a6821982787mr20520766b.58.1717114275493; Thu, 30 May 2024 17:11:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240503081125.67990-1-arnd@kernel.org> <272a909522f2790a30b9a8be73ab7145bf06d486.camel@physik.fu-berlin.de> In-Reply-To: From: Linus Torvalds Date: Thu, 30 May 2024 17:10:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/14] alpha: cleanups for 6.10 To: "Maciej W. Rozycki" Cc: "Paul E. McKenney" , John Paul Adrian Glaubitz , Arnd Bergmann , linux-alpha@vger.kernel.org, Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Alexander Viro , Marc Zyngier , linux-kernel@vger.kernel.org, Michael Cree , Frank Scheiner Content-Type: text/plain; charset="UTF-8" On Thu, 30 May 2024 at 15:57, Maciej W. Rozycki wrote: > > On Wed, 29 May 2024, Linus Torvalds wrote: > > > > The 21064 actually did atomicity with an external pin on the bus, the > > same way people used to do before caches even existed. > > Umm, 8086's LOCK#, anyone? Well, yes and no. So yes, exactly like 8086 did before having caches. But no, not like the alpha contemporary PPro that did have caches. The PPro already did locked cycles in the caches. Yes, the PPro still did have an external lock pin (and in fact current much more modern x86 CPUs do too), but it's only used for locked IO accesses or possibly cacheline crossing accesses. So x86 has supported atomic accesses on IO - and it is very very slow, to this day. So slow, and problematic, in fact, that Intel is only now trying to remove it (look up "split lock" But the 21064 explicitly did not support locking on IO - and unaligned LL/SC accesses obviously also did not work. So I really feel the 21064 was broken. It's probably related to the whole cache coherency being designed to be external to the built-in caches - or even the Bcache. The caches basically are write-through, and the weak memory ordering was designed for allowing this horrible model. > > In fact, it's worse than "not thread safe". It's not even safe on UP > > with interrupts, or even signals in user space. > > Ouch, I find it a surprising oversight. The sad part is that it doesn't seem to have been an oversight. It really was broken-as-designed. Basically, the CPU was designed for single-threaded Spec benchmarks and absolutely nothing else. Classic RISC where you recompile to fix problems like the atomicity thing - "just use a 32-bit sig_atomic_t and you're fine") The original alpha architecture handbook makes a big deal of how clever the lack of byte and word operations is. I also remember reading an article by Dick Sites - one of the main designers - talking a lot about how the lack of byte operations is great, and encourages vectorizing byte accesses and doing string operations in whole words. Linus