Re: [PATCH] nvmet: use try_cmpxchg in nvmet_update_sq_head
From: Chaitanya Kulkarni
Date: Mon Oct 24 2022 - 21:21:47 EST
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@xxxxxxxxxx>
-ck