Skip to content
Commit 96567161 authored by Christian Ehrhardt's avatar Christian Ehrhardt Committed by Linus Torvalds
Browse files

[PATCH] s390: Increase spinlock retry code performance



Currently the code tries up to spin_retry times to grab a lock using the cs
instruction.  The cs instruction has exclusive access to a memory region
and therefore invalidates the appropiate cache line of all other cpus.  If
there is contention on a lock this leads to cache line trashing.  This can
be avoided if we first check wether a cs instruction is likely to succeed
before the instruction gets actually executed.

Signed-off-by: default avatarChristian Ehrhardt <ehrhardt@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6a88231f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment