MEDIUM: mt_list: Reduce the max number of loops with exponential backoff
Reduce the max number of loops in the mt_list code while waiting for a lock to be available with exponential backoff. It's been observed that the current value led to severe performances degradation at least on some hardware, hopefully this value will be acceptable everywhere.
This commit is contained in:
parent
c5f8df8d55
commit
98967aa09f
@ -225,7 +225,7 @@ static inline __attribute__((always_inline)) unsigned long mt_list_cpu_relax(uns
|
||||
/* limit maximum wait time for unlucky threads */
|
||||
loop = mt_list_wait(loop);
|
||||
|
||||
for (loop &= 0x7fffff; loop >= 32; loop--) {
|
||||
for (loop &= 0xfffff; loop >= 32; loop--) {
|
||||
#if defined(__x86_64__)
|
||||
/* This is a PAUSE instruction on x86_64 */
|
||||
asm volatile("rep;nop\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user