• M
    s390/spinlock: add compare-and-delay to lock wait loops · 2c72a44e
    Martin Schwidefsky 提交于
    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: NMartin Schwidefsky <schwidefsky@de.ibm.com>
    2c72a44e
spinlock.c 5.9 KB
反馈
建议
客服 返回
顶部