diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -128,10 +128,6 @@ struct lock_delay_config *lc = la->config; u_short i; - la->delay <<= 1; - if (__predict_false(la->delay > lc->max)) - la->delay = lc->max; - for (i = la->delay; i > 0; i--) cpu_spinwait(); @@ -141,6 +137,10 @@ if (restrict_starvation) la->delay = lc->base; } + + la->delay <<= 1; + if (__predict_false(la->delay > lc->max)) + la->delay = lc->max; } static u_int