diff options
author | Uros Bizjak <[email protected]> | 2024-05-23 09:35:14 +0200 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-06-24 22:24:56 -0700 |
commit | 47e39c79336760031f98215c014c9800f5ed6481 (patch) | |
tree | 20851bdb3feb8b90a03e4f9eaac4a4ad1f462e9a /tools/perf/scripts/python/mem-phys-addr.py | |
parent | af77c4fc1871847b528d58b7fdafb4aa1f6a9262 (diff) |
fork: use this_cpu_try_cmpxchg() in try_release_thread_stack_to_cache()
Use this_cpu_try_cmpxchg() instead of this_cpu_cmpxchg (*ptr, old, new) ==
old in try_release_thread_stack_to_cache. x86 CMPXCHG instruction returns
success in ZF flag, so this change saves a compare after cmpxchg (and
related move instruction in front of cmpxchg).
No functional change intended.
[[email protected]: simplify the for loop a bit]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Uros Bizjak <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions