In yet another discussion, Mark Callaghan pointed to a reference to pthread based mutex spin using PTHREAD_MUTEX_ADAPTIVE_NP (
MDEV-26769 Intel RTM).
Given the strong references, Marko Makela as part of his comment in #1923 pointed an idea to enable
spinning for other mutexes. Based on perf profiling we decided to explore spinning for
log_sys_mutex and log_flush_order_mutex as they are occupying the top slots in the contented mutex list.
The evaluation showed promising results for ARM64 but not for x86.
So a patch is here-by proposed to enable the spinning of the mutex for ARM-based platform.