linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: "Christoph Lameter (Ampere)" <cl@gentwo.org>
Cc: Dev Jain <dev.jain@arm.com>, Will Deacon <will@kernel.org>,
	Jisheng Zhang <jszhang@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, maz@kernel.org
Subject: Re: [PATCH] arm64: remove HAVE_CMPXCHG_LOCAL
Date: Mon, 23 Feb 2026 10:19:13 +0100	[thread overview]
Message-ID: <20260223091913.8139A0b-hca@linux.ibm.com> (raw)
In-Reply-To: <6d30176d-9673-287e-4658-a5e9e6e5d649@gentwo.org>

On Tue, Feb 17, 2026 at 09:19:22AM -0800, Christoph Lameter (Ampere) wrote:
> On Mon, 16 Feb 2026, Dev Jain wrote:
> 
> > By coincidence, Yang Shi has been discussing the this_cpu_* overhead
> > at [2].
> 
> 
> Yang Shi is on vacation but we have a patchset that removes
> preempt_enable/disable from this_cpu operations on ARM64.
> 
> The performance of cmpxchg varies by platform in use and with the kernel
> config. The measurements that I did 2 years ago indicated that the cmpxchg
> use with Ampere processors did not cause a regression.
> 
> Note that distro kernels often do not enable PREEMPT_FULL and therefore
> preempt_disable/enable overhead is not incurred in production systems.
> 
> PREEMPT_VOLUNTARY does not use preemption for this_cpu ops.

Note that with commit 7dadeaa6e851 ("sched: Further restrict the preemption
modes") at least PREEMPT_LAZY is enforced, which comes together with
PREEMPT_BUILD and full preempt_disable()/preempt_enable() overhead for
this_cpu_* ops for every "up-to-date" architecture (except x86).

PREEMPT_NONE and PREEMPT_VOLUNTARY are gone for those architectures.


  reply	other threads:[~2026-02-23  9:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-15  3:39 Jisheng Zhang
2026-02-16 10:59 ` Dev Jain
2026-02-16 11:00 ` Will Deacon
2026-02-16 15:29   ` Dev Jain
2026-02-17 13:53     ` Catalin Marinas
2026-02-17 15:00       ` Will Deacon
2026-02-17 16:48         ` Catalin Marinas
2026-02-18  4:01           ` K Prateek Nayak
2026-02-18  9:29             ` Catalin Marinas
2026-02-17 17:19     ` Christoph Lameter (Ampere)
2026-02-23  9:19       ` Heiko Carstens [this message]
2026-02-20  6:14     ` Jisheng Zhang
2026-02-18 22:07 ` Shakeel Butt
2026-02-20  6:20   ` Jisheng Zhang
2026-02-20 23:27     ` Shakeel Butt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260223091913.8139A0b-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@gentwo.org \
    --cc=dennis@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=jszhang@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maz@kernel.org \
    --cc=tj@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox