From: Linus Torvalds <torvalds@linux-foundation.org>
To: Waiman Long <longman@redhat.com>
Cc: cl@gentwo.org, Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC] Avoid memory barrier in read_seqcount() through load acquire
Date: Tue, 13 Aug 2024 13:01:50 -0700 [thread overview]
Message-ID: <CAHk-=why9gTVRPHwbyz-24QSmKW1zXrF_pbS-UtDyQddyzEu9A@mail.gmail.com> (raw)
In-Reply-To: <5d54a189-3c2b-440a-9626-4e00e95a7f77@redhat.com>
On Tue, 13 Aug 2024 at 12:58, Waiman Long <longman@redhat.com> wrote:
>
> Sorry for the confusion. What you said above is actually the reason that
> I ask this question. In the same way, smp_rmb()/wmb() is available for
> all arches. I am actually asking if it should be a flag that indicates
> the arch's preference to use acquire/release over rmb/wmb.
I think that if an arch says it has native acquire/release, we should
basically assume that it's the better model.
I mean, we could certainly use "PREFERS" instead of "HAS", but is
there any real reason to do that?
Do we suddenly expect that people would make a CPU that has native
acquire/release, and it would somehow then prefer a full read barrier?
Linus
next prev parent reply other threads:[~2024-08-13 20:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 18:26 Christoph Lameter via B4 Relay
2024-08-13 19:01 ` Waiman Long
2024-08-13 19:41 ` Christoph Lameter (Ampere)
2024-08-13 19:48 ` Linus Torvalds
2024-08-13 19:58 ` Waiman Long
2024-08-13 20:01 ` Linus Torvalds [this message]
2024-08-13 20:23 ` Waiman Long
2024-08-19 8:45 ` Mark Rutland
2024-08-19 16:25 ` Linus Torvalds
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='CAHk-=why9gTVRPHwbyz-24QSmKW1zXrF_pbS-UtDyQddyzEu9A@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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