Skip to content
Commit 2c72a44e authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390/spinlock: add compare-and-delay to lock wait loops



Add the compare-and-delay instruction to the spin-lock and rw-lock
retry loops. A CPU executing the compare-and-delay instruction stops
until the lock value has changed. This is done to make the locking
code for contended locks to behave better in regard to the multi-
hreading facility. A thread of a core executing a compare-and-delay
will allow the other threads of a core to get a larger share of the
core resources.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 55b5eb75
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment