From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 7C8CE2F0C45 for ; Wed, 18 Feb 2026 22:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771452490; cv=none; b=oVd7sRUsnmdmaALLanKsA06FLCKC3mhPYuSRCUg6KEkQpCzDeYPeKYRDqv5+cirKahB4kBNoBoH425F3nMwm/3PrC/d/HTZqhjM6erdZo1XQ7y0KobaDr/a6e6tMC8UMN1kuzqEeef+VV18BcX8mhVSdHeTKQ0sI/jmyJGZOL+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771452490; c=relaxed/simple; bh=STuiVYd07OeQK0Jc8vDcvJXl1fWs0qjmLbUunhQf44s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mc+/rFbiSS4vg9v1tyPkSnxWXbvabKLkY2EQGpVK9VsiIN/C4qlk9G+RcKlgMEh4PFrt11zVtwsJD9+/ICztjua4JBbfnm3n592OU/J56YUXp4RA7MQ2yovXS0l+wdCzzFPlpzU1Gcb3FU379Qjq3BPnJyjg093s+J9BJhPBAS0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TDCGGAmU; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TDCGGAmU" Date: Wed, 18 Feb 2026 14:07:57 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771452485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PkQZRG8kkv/0JZ4QGiciA4Q1sGZEe0QvxA9mlMq1dYQ=; b=TDCGGAmUvkAuX/mo0nag675svbXFq3hMs4EG1iduTdhKTQitfUntudSYxKpkvpLYMdrxE4 I3BOIw7EFJqvAV16juvmCflQXUz5SOO8BYCfSSLKDwgQ6u+0dwRbWEsd5DXWxFxsfoDJiK UovwLqkE9q/FmQSixb8/OVlkrgEtedI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Jisheng Zhang Cc: Catalin Marinas , Will Deacon , Dennis Zhou , Tejun Heo , Christoph Lameter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] arm64: remove HAVE_CMPXCHG_LOCAL Message-ID: References: <20260215033944.16374-1-jszhang@kernel.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=us-ascii Content-Disposition: inline In-Reply-To: <20260215033944.16374-1-jszhang@kernel.org> X-Migadu-Flow: FLOW_OUT On Sun, Feb 15, 2026 at 11:39:44AM +0800, Jisheng Zhang wrote: > It turns out the generic disable/enable irq this_cpu_cmpxchg > implementation is faster than LL/SC or lse implementation. Remove > HAVE_CMPXCHG_LOCAL for better performance on arm64. > > Tested on Quad 1.9GHZ CA55 platform: > average mod_node_page_state() cost decreases from 167ns to 103ns > the spawn (30 duration) benchmark in unixbench is improved > from 147494 lps to 150561 lps, improved by 2.1% > > Tested on Quad 2.1GHZ CA73 platform: > average mod_node_page_state() cost decreases from 113ns to 85ns > the spawn (30 duration) benchmark in unixbench is improved > from 209844 lps to 212581 lps, improved by 1.3% > > Signed-off-by: Jisheng Zhang Please note that mod_node_page_state() can be called in NMI context and generic disable/enable irq are not safe against NMIs (newer arm arch supports NMI).