summaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-01-24 11:58:16 +0100
committerIngo Molnar <mingo@kernel.org>2024-03-01 12:54:25 +0100
commite807c2a37044a51de89d6d4f8a1f5ecfb3752f36 (patch)
tree6bbce6951a8ff33b095fea22a79f6f9dc762b555 /kernel/locking
parentf3e3620f1a97fcd02a5f3606fa63888dbcffd82c (diff)
downloadlinux-stable-e807c2a37044a51de89d6d4f8a1f5ecfb3752f36.tar.gz
linux-stable-e807c2a37044a51de89d6d4f8a1f5ecfb3752f36.tar.bz2
linux-stable-e807c2a37044a51de89d6d4f8a1f5ecfb3752f36.zip
locking/x86: Implement local_xchg() using CMPXCHG without the LOCK prefix
Implement local_xchg() using the CMPXCHG instruction without the LOCK prefix. XCHG is expensive due to the implied LOCK prefix. The processor cannot prefetch cachelines if XCHG is used. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Link: https://lore.kernel.org/r/20240124105816.612670-1-ubizjak@gmail.com
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions