From: David Laight <david.laight.linux@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Jan Engelhardt <ej@inai.de>,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, Bradley Morgan <brads@mainlining.org>,
Arnd Bergmann <arnd@kernel.org>
Subject: Re: [GIT PULL] Add two-byte cmpxchg emulation function for v7.4
Date: Tue, 3 Nov 2026 22:47:25 +0000 [thread overview]
Message-ID: <20261103224725.253b560d@pumpkin> (raw)
In-Reply-To: <ad8358f4-483c-41d3-8fae-e7032c4a5bd7@paulmck-laptop>
On Tue, 3 Nov 2026 10:19:23 -0800
"Paul E. McKenney" <paulmck@kernel.org> wrote:
> On Tue, Nov 03, 2026 at 03:03:47AM +0100, Jan Engelhardt wrote:
> >
> > On Monday 2026-11-02 17:34, David Laight wrote:
> > >>
> > >> I can get gcc-17.0.0-20261102 with no further command line options
> > >> to turn `atomic_compare_exchange_strong`+uint16 into some object code
> > >> that does not contain a call to libatomic, for sh2, sh3, sh4. Haven't
> > >> tried xtensa or the others.
> > >> Thus, is the patch really needed?
> > >
> > >Won't that need a big jump in the minimum supported compiler version?
> >
> > 12.0.0-20210420 behaves the same. I just chose 17 because that was
> > convenient to try first.
>
> Are you also advocating ditching the single-byte cmpxchg() emulation?
> If the compiler really can handle this emulation for all sizes on all
> supported compilers on all affected architectures, that is actually not
> at all an unattractive approach.
What is the 'bloat factor'?
While the function call costs, the atomic op isn't cheap either.
Or are you putting the compiler generated code in the function?
David
>
> Thanx, Paul
next prev parent reply other threads:[~2026-11-03 22:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 3:51 Paul E. McKenney
2026-10-20 18:48 ` John Paul Adrian Glaubitz
2026-10-20 18:54 ` Bradley Morgan
2026-10-20 19:21 ` Paul E. McKenney
2026-10-20 19:26 ` Bradley Morgan
2026-10-20 19:14 ` Paul E. McKenney
2026-10-21 9:13 ` John Paul Adrian Glaubitz
2026-10-21 1:08 ` pr-tracker-bot
2026-10-23 11:26 ` Jan Engelhardt
2026-10-23 16:12 ` Paul E. McKenney
2026-11-02 12:21 ` Jan Engelhardt
2026-11-02 16:34 ` David Laight
2026-11-03 2:03 ` Jan Engelhardt
2026-11-03 18:19 ` Paul E. McKenney
2026-11-03 18:49 ` Bradley Morgan
2026-11-03 20:11 ` Jan Engelhardt
2026-11-03 20:33 ` Paul E. McKenney
2026-11-03 22:47 ` David Laight [this message]
2026-11-03 23:03 ` Paul E. McKenney
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=20261103224725.253b560d@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=arnd@kernel.org \
--cc=brads@mainlining.org \
--cc=ej@inai.de \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®