• Paul Burton's avatar
    MIPS: Select CONFIG_ARCH_USE_CMPXCHG_LOCKREF for MIPS64 · 5fac4f7a
    Paul Burton authored
    On MIPS64 we have spinlocks that are 32b in size and an efficient
    cmpxchg64 implementation, so we qualify to make use of cmpxchg backed
    lockrefs. Select the ARCH_USE_CMPXCHG_LOCKREF Kconfig symbol and provide
    a trivial implementation of arch_spin_value_unlocked to satisfy the
    lockref code.
    
    Using Linus' simple testcase from
    http://article.gmane.org/gmane.linux.file-systems/77466 on a dual core
    system with an in-development MIPS64 CPU running on FPGA I see around an
    8% gain:
    
    Pre-patch:
        Total loops: 252698
        Total loops: 251482
        Total loops: 250806
        Total loops: 252885
        Total loops: 251666
    
    Post-patch:
        Total loops: 273728
        Total loops: 269932
        Total loops: 269341
        Total loops: 275004
        Total loops: 270208
    
    [ralf@linux-mips.org: Fixed conflict.]
    Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: Steven J. Hill <Steven.Hill@imgtec.com>
    Cc: linux-kernel@vger.kernel.org
    Cc: Maciej W. Rozycki <macro@codesourcery.com>
    Cc: Markos Chandras <markos.chandras@imgtec.com>
    Patchwork: https://patchwork.linux-mips.org/patch/10810/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    5fac4f7a
Kconfig 72.3 KB