Commit afe89d55 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Reduce contention on the wstat_mtx marginally while we figure out

what the real solution is going to be.
parent 010aac8a
......@@ -54,7 +54,6 @@ wrk_sumstat(struct worker *w)
#undef VSC_F
#undef L0
#undef L1
memset(&w->stats, 0, sizeof w->stats);
}
void
......@@ -64,6 +63,7 @@ WRK_SumStat(struct worker *w)
Lck_Lock(&wstat_mtx);
wrk_sumstat(w);
Lck_Unlock(&wstat_mtx);
memset(&w->stats, 0, sizeof w->stats);
}
int
......@@ -73,6 +73,7 @@ WRK_TrySumStat(struct worker *w)
return (0);
wrk_sumstat(w);
Lck_Unlock(&wstat_mtx);
memset(&w->stats, 0, sizeof w->stats);
return (1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment