diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2022-08-22 16:32:43 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 14:20:35 -0700 |
commit | b9030780971b56c0c455c3b66244efd96608846d (patch) | |
tree | 59874de2ee8d35ea7645e97fa02b878a68febf6e /fs/cifs/cifsroot.c | |
parent | 2c58a91495e67e1002ce3d71830bbbc618044b31 (diff) | |
download | linux-b9030780971b56c0c455c3b66244efd96608846d.tar.bz2 |
netdev: Use try_cmpxchg in napi_if_scheduled_mark_missed
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in
napi_if_scheduled_mark_missed. x86 CMPXCHG instruction returns
success in ZF flag, so this change saves a compare after cmpxchg
(and related move instruction in front of cmpxchg).
Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg
fails, enabling further code simplifications.
Cc: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20220822143243.2798-1-ubizjak@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/cifs/cifsroot.c')
0 files changed, 0 insertions, 0 deletions