• Martin Schwidefsky's avatar
    s390/spinlock: add compare-and-delay to lock wait loops · 2c72a44e
    Martin Schwidefsky authored
    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>
    2c72a44e
early.c 12.1 KB