• Daniel Black's avatar
    MDEV-27936 hardware lock elision on ppc64{,le} failing to compile · e8fc62b9
    Daniel Black authored
    There is only a very small range of gcc compiler versions
    that allow the built_{htm} functions to be defined without -mhtm
    being specified as a global C{,XX}FLAGS.
    
    Because the design is centered around enable HTM only in the
    functional blocks that use it, this breaks on the inclusion
    of the htmxlintrin.h header that includes this.
    
    As a partial mitigation, extented to GNU/clang compilers,
    transaction functions gain the attribute "hot".
    
    In general the use of htm is around the optimistic
    transaction ability of the function. The key part of using the
    hot attribute is to place these functions together so that
    a maximization of icache, tlb and OS paging can ensure that
    these can be ready to execute by any thread/cpu with the
    minimum amount of overhead.
    
    POWER is particularly affected here because the xbegin/xend
    functions are not inline.
    
    srw_lock.cc requires the -mhtm cflag, both in the storage
    engine and the unit tests.
    e8fc62b9
CMakeLists.txt 1.36 KB