• Marko Mäkelä's avatar
    MDEV-26467: Avoid re-reading srv_spin_wait_delay inside a loop · 0f0b7e47
    Marko Mäkelä authored
    Invoking ut_delay(srv_wpin_wait_delay) inside a spinloop would
    cause a read of 2 global variables as well as multiplication.
    Let us loop around MY_RELAX_CPU() using a precomputed loop count
    to keep the loops simpler, to help them scale better.
    
    We also tried precomputing the delay into a global variable,
    but that appeared to result in slightly worse throughput.
    0f0b7e47
buf0buf.cc 123 KB