From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB774344DB5 for ; Tue, 4 Aug 2026 15:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785855966; cv=none; b=dCYy/XcyLzWLKxrrM5WproNn/d2Tbex4XkMRzwFXm2FAcpgJ6VRpQgw1IqKfpzj/v+rWix5wbDwVuHu02SRczsNNvsQMdz3EuKVa6omhgK1RKrcghZOVZXtHMalsDeO2yap/pLMx2kaFBYm4ix15hr6AwGWUqs/+PnC1jDdnH8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785855966; c=relaxed/simple; bh=lQ/vZbd2M6VD7tf7cRNuxfTToCU1ookzVTXaid79xFU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UDUV9wK+nwGgkgcbdRzvq5FnOq37u+PgZdYfvZBklh/B2gJJU2NkHopfiZF3cQILY5UcVS7QnHNyaGaY5qB40CCkSKgcWIKhwpFZlGFMXpBhjAwH4Y2KDUWP85/CvyUb+0e9M90d4ufOiRjj1vH4opb1EwwSdEJCHng8bTnC6j8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ULShoy7e; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ULShoy7e" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2FA571476; Tue, 4 Aug 2026 08:05:58 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 058053F86F; Tue, 4 Aug 2026 08:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785855962; bh=lQ/vZbd2M6VD7tf7cRNuxfTToCU1ookzVTXaid79xFU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ULShoy7eOaT0f/lHcDVnjJBbewGBHD9Y5q+k5Z/D2snNygxZj8dWhLC9a0AgR8j5O wVxTcSfbm1PrnGaddZzTrOLRehZYFkzbfZ0h6CQyZ1olgtxUxQNco0o7J8NUIK7chf rmIAN57YPRzz1cUWunhmRE32j+KSQd7n1tPhz7OQ= Date: Tue, 4 Aug 2026 16:05:57 +0100 From: Mark Rutland To: David Laight Cc: linux-arm-kernel@lists.infradead.org, ada.coupriediaz@arm.com, ardb@kernel.org, catalin.marinas@arm.com, hca@linux.ibm.com, linux-kernel@vger.kernel.org, maz@kernel.org, peterz@infradead.org, ruanjinjie@huawei.com, vladimir.murzin@arm.com, will@kernel.org, yang@os.amperecomputing.com Subject: Re: [RFC PATCH 07/13] arm64: percpu: Implement preemptible read/write ops Message-ID: References: <20260728123859.2911495-1-mark.rutland@arm.com> <20260728123859.2911495-8-mark.rutland@arm.com> <20260728230504.41e2861a@pumpkin> 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 Content-Disposition: inline In-Reply-To: <20260728230504.41e2861a@pumpkin> On Tue, Jul 28, 2026 at 11:05:04PM +0100, David Laight wrote: > On Tue, 28 Jul 2026 13:38:53 +0100 > Mark Rutland wrote: > > > Generated code after this patch: > > > > | : > > | mrs x2, sp_el0 > > | mov w3, #0x7c60 > > | strh w3, [x2, #20] > > | mrs x3, tpidr_el1 > > | str x1, [x0, x3] > > | strh wzr, [x2, #20] > > | ret > > How is that likely to get scheduled on a typical arm64 cpu? > In particular does the reuse of [wx]3 create a register dependency > between the two instruction flows and stop then running in parallel. > A typical x86 cpu (that anyone cares about) does register renaming > so it wouldn't matter, but I don't know about arm. > So it might be worth using different register for w3 and x3 (although > that might cause a spill - which will be worse). Practically speaking, any CPU which hits hazards those uses of w3 and x3 is not worth worrying about. It is not worth allocating another register here. Mark.