Re: [PATCH 2/2] mm/vmalloc: Use __this_cpu_try_cmpxchg() in preload_this_cpu_lock()

From: Uladzislau Rezki
Date: Tue May 28 2024 - 10:06:20 EST


> Use __this_cpu_try_cmpxchg() instead of
> __this_cpu_cmpxchg (*ptr, old, new) == old in
> preload_this_cpu_lock(). x86 CMPXCHG instruction returns
> success in ZF flag, so this change saves a compare after cmpxchg.
>
Just a small note. Can you also add a tiny difference in assembly
language where it is visible? I mean update a commit message.

--
Uladzislau Rezki