Index: mysql-5.7.4-m14/mysys/thr_mutex.c =================================================================== --- mysql-5.7.4-m14.orig/mysys/thr_mutex.c +++ mysql-5.7.4-m14/mysys/thr_mutex.c @@ -400,9 +400,16 @@ int my_pthread_fastmutex_lock(my_pthread if (res != EBUSY) return res; - +#ifdef __powerpc__ + /* Set low thread priority while spinning */ + asm volatile ("or 1,1,1"); +#endif mutex_delay(maxdelay); maxdelay += park_rng(mp) * MY_PTHREAD_FASTMUTEX_DELAY + 1; +#ifdef __powerpc__ + /* return to normal thread priority after spinning */ + asm volatile ("or 2,2,2"); +#endif } return pthread_mutex_lock(&mp->mutex); }