• Marko Mäkelä's avatar
    MDEV-26828 Spinning on buf_pool.page_hash is wasting CPU cycles · fdae71f8
    Marko Mäkelä authored
    page_hash_latch: Only use the spinlock implementation on
    SUX_LOCK_GENERIC platforms (those for which we do not implement
    a futex-like interface). Use srw_spin_mutex on 32-bit systems
    (except Microsoft Windows) to satisfy the size constraints.
    
    rw_lock::is_read_locked(): Remove. We will use the slightly
    broader assertion is_locked().
    
    srw_lock_: Implement is_locked(), is_write_locked() in a hacky
    way for the Microsoft Windows SRWLOCK. This should be acceptable,
    because we are only using these predicates in debug assertions
    (or later, in lock elision), and false positives should not matter.
    fdae71f8
rw_lock.h 8.72 KB