linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
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 15:58:27 -0400	[thread overview]
Message-ID: <5d54a189-3c2b-440a-9626-4e00e95a7f77@redhat.com> (raw)
In-Reply-To: <CAHk-=whgwpzsn9XvZt3zRgP87r4mSScD04P_g5JeiR1irN3vRA@mail.gmail.com>


On 8/13/24 15:48, Linus Torvalds wrote:
> On Tue, 13 Aug 2024 at 12:01, Waiman Long <longman@redhat.com> wrote:
>> Do we need a new ARCH flag?
> I'm confused by that question.
>
> That's clearly exactly what that ARCH_HAS_ACQUIRE_RELEASE is.
>
> Obviously all architectures "have" it - in the sense that we always
> have access to a "smp_load_acquire()/smp_store_release()".

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.

Cheers,
Longman

>
> But if the architecture doesn't support it natively, the old rmb/wmb
> model may be preferred.
>
> Although maybe we're at the point where we don't even care about that.
>
>                Linus
>



  reply	other threads:[~2024-08-13 19:58 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 [this message]
2024-08-13 20:01       ` Linus Torvalds
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=5d54a189-3c2b-440a-9626-4e00e95a7f77@redhat.com \
    --to=longman@redhat.com \
    --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=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.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