Re: [PATCH RFC] Avoid memory barrier in read_seqcount() through load acquire

From: Linus Torvalds
Date: Tue Aug 13 2024 - 15:48:41 EST


On Tue, 13 Aug 2024 at 12:01, Waiman Long <longman@xxxxxxxxxx> 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()".

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