Messages in this thread | | | From | Chaitanya Kulkarni <> | Subject | Re: [PATCH] nvmet: use try_cmpxchg in nvmet_update_sq_head | Date | Tue, 25 Oct 2022 00:47:05 +0000 |
| |
On 10/20/22 08:35, Uros Bizjak wrote: > Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in > nvmet_update_sq_head. x86 CMPXCHG instruction returns success in ZF flag, so > this change saves a compare after cmpxchg (and related move instruction in > front of cmpxchg). >
Is it worth a share delts of assembly instructions of the changes above? as developers on block mailing list are sharing the delta between before and after patch including the assembly.
I also hope that you have tested this change with blktests nvme.
Either way:-
Reviewed-by: ChaItanya Kulkarni <kch@nvidia.com>
-ck
| |