Re: [patch V3 06/14] x86: Select ARCH_MEMORY_ORDER_TOS

Thomas Gleixner
2026-03-30T19:48:54Z

On Mon, Mar 30 2026 at 14:34, Mark Rutland wrote:
> On Mon, Mar 30, 2026 at 02:02:31PM +0200, Thomas Gleixner wrote:
>> The generic unsafe_atomic_store_release_user() implementation does:
>>
>> if (!IS_ENABLED(CONFIG_ARCH_MEMORY_ORDER_TOS))
>> smp_mb();
>> unsafe_put_user();
>>
>> As x86 implements Total Store Order (TOS) which means stores imply release,
>> select ARCH_MEMORY_ORDER_TOS to avoid the unnecessary smp_mb().
>>
>> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
>> Reviewed-by: André Almeida <andrealmeid@igalia.com>
>> ---
>> V3: Rename to TOS - Peter
>
> As on the last patch, shouldn't that be TSO?

Duh. Yes. My dyslexia seems to get worse.