Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp205851lqh; Thu, 30 May 2024 20:56:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVYvsBKPHrWJHEW6z58kF0m1uOApr6zdt927bmUPrT30jBOuh0riHMIKZr41+3Q3oRr9nLBqhX5JPmFqe7DQ+z3KXvbkBq1DIV6TxGB9A== X-Google-Smtp-Source: AGHT+IFBm9F+009qD6ha5Uj8ORdIfqxC6EmrZ9zorACZOq23o5t0q5uXjXo7uNBOqaoXJTtDXiNC X-Received: by 2002:a17:90a:a013:b0:2bd:76f6:8d30 with SMTP id 98e67ed59e1d1-2c1dc5bbe50mr656620a91.32.1717127799498; Thu, 30 May 2024 20:56:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717127799; cv=pass; d=google.com; s=arc-20160816; b=0+1QbgO1heLu6P4CUX1N/8/GNnPreLm0OFBeCP7gIwr5hcRNBtOI83txFrlma7DCEV 5vxvVT2tq+kukDwDYpQXw7XxaV8Tv3Sp6Rnbc8rLX4R18lQHGf82XNaUGogtBrDskKFj 6kwE+afjlVMt6zU/z9QKllyikukoqvxYqJWqD7sJ5D/P4aqi2tBQgvxe7xZbiINrKL+N KFExEVHIdUfqzqXefm0eDVxlcbS2X/jTp0gUiRIxXjpqGvsDBrcBDB2KcbNfq6BFqY0g Bioos025o2gs8OOUDxpRRfGsHPzl2IR+r5vHZir41FxQA7vUjnv6UWHaWI/k//uMYhC3 NRFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=8gh9P82nt6BifnNlyjKpW9eVZNupgGBgkChhsZb2UPA=; fh=P2j1Jdod4hu66N1YxlUQSANCzTyVzmdtI81G2F/ZR6s=; b=XFKAa2XTvqctiliyROkYwiPgHHXbhH6/Rf4pDSF7PuDYEMSvD9dlDlM5ZHGcfE3Xmk IbD5VYJexONoaS9+2GZ/oeHj1yXHBSQP2Jsks4hBaEdpYQgFwaaOC5uTQgmWSEAlOq3R HywoNcB2c7Ep8UyraPCDNZXLA29vAySwaIZBy7h9a0SlBU1lgpBwqzMnGpvoSJkmniHu nbQZeYxDSbP9cCDjfSHOJIK9nOuF4NzAllv9rObFxmvgJeHUYIhyCMIeOr2LkZZrpBpa f7dq0943wRQzv9y+I1L1NPCnRJI3EcHp4a8ph54GygEPGNMCIHYJbdQZPcEHXidtlXKc 8OuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-196230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196230-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c284e51asi781921a91.173.2024.05.30.20.56.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 20:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-196230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196230-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B694F286004 for ; Fri, 31 May 2024 03:56:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C0EB78269; Fri, 31 May 2024 03:56:33 +0000 (UTC) Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59E10D51E; Fri, 31 May 2024 03:56:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.133.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717127793; cv=none; b=nUbrKN3MJFLeYYo9dQ9QdYNMJ1J1+Gfe9JON0qKV9pk6teV23+dqDmV9zM1f07oRSsIHSJSN/WTZM73oiYBmqiygbCxrwhvvML8rcUajkgOwoWkKQqixSjhPwCpMwseML9yH0AGK6ckRRe8vZPonG0YatlSD+TY8lqn2vY9fdRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717127793; c=relaxed/simple; bh=YauT7wCmRx8kBE4DMQNErf1RhLlFHwMRcrG+c4Q0l0w=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=CjjoAWWZbuO13E01UvDgZnr0ZVPiddVhY+s3blPm5XC4mqneOoLlqFZSk22uqkBymMhnmkXqCtSl0Y9TXgzYYvU2R77wRpatz5+MOXsTNAjQDTmqJSJhWwNZd1l6DaKQAbHDIa2F2jFw4pwFxebw3dIV1QsPYcLvpcV74ROdOhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk; spf=none smtp.mailfrom=orcam.me.uk; arc=none smtp.client-ip=78.133.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id C1D8D92009C; Fri, 31 May 2024 05:56:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id B345092009B; Fri, 31 May 2024 04:56:28 +0100 (BST) Date: Fri, 31 May 2024 04:56:28 +0100 (BST) From: "Maciej W. Rozycki" To: "Paul E. McKenney" cc: John Paul Adrian Glaubitz , Arnd Bergmann , linux-alpha@vger.kernel.org, Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Alexander Viro , Marc Zyngier , Linus Torvalds , linux-kernel@vger.kernel.org, Michael Cree , Frank Scheiner Subject: Re: [PATCH 00/14] alpha: cleanups for 6.10 In-Reply-To: <5567ab2e-80af-4c5f-bebb-d979e8a34f49@paulmck-laptop> Message-ID: References: <20240503081125.67990-1-arnd@kernel.org> <272a909522f2790a30b9a8be73ab7145bf06d486.camel@physik.fu-berlin.de> <5567ab2e-80af-4c5f-bebb-d979e8a34f49@paulmck-laptop> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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=US-ASCII On Wed, 29 May 2024, Paul E. McKenney wrote: > > Mind that the read-modify-write sequence that software does for sub-word > > write accesses with original Alpha hardware is precisely what hardware > > would have to do anyway and support for that was deliberately omitted by > > the architecture designers from the ISA to give it performance advantages > > quoted in the architecture manual. The only difference here is that with > > hardware read-modify-write operations atomicity for sub-word accesses is > > guaranteed by the ISA, however for software read-modify-write it has to be > > explictly coded using the usual load-locked/store-conditional sequence in > > a loop. I don't think it's a big deal really, it should be trivial to do > > in the relevant accessors, along with the memory barriers that are needed > > anyway for EV56+ and possibly other ports such as the MIPS one. > > There shouldn't be any memory barriers required, and don't EV56+ have > single-byte loads and stores? I should have commented on this in my original reply. You're the RCU expert so you know the answer. I don't. If it's OK for successive writes to get reordered, or readers to see a stale value, then you don't need memory barriers. Otherwise you do. Whether byte accesses are available or not does not matter, the CPU *will* do reordering if it's allowed to (or more specifically, it won't do anything to prevent it from happening, especially in SMP configurations; I can't remember offhand if there are cases with UP). Also adjacent byte writes may be merged, but I suppose it does not matter, or does it? NB MIPS has similar architectural arrangements (and a bunch of barriers defined in the ISA), it's just most implementations are actually strongly ordered, so most people can't see the effects of this. With MIPS I know for sure there are cases of UP reordering, but they only really matter for MMIO use cases and not regular memory. Maciej