Permalink
Browse files

use monotonic time for the watchdog

  • Loading branch information...
nigoroll committed Oct 9, 2018
1 parent 4dcb8fb commit 827cd226e42cd1048262b4260ee151eb602486ce
Showing with 4 additions and 4 deletions.
  1. +4 −4 bin/varnishd/cache/cache_wrk.c
@@ -489,7 +489,7 @@ pool_herder(void *priv)
double delay;
int wthread_min;
uintmax_t dq = (1ULL << 31);
double dqt = 0;
vtim_mono dqt = 0;
CAST_OBJ_NOTNULL(pp, priv, POOL_MAGIC);
@@ -514,11 +514,11 @@ pool_herder(void *priv)
dq = pp->ndequeued + 1;
} else if (dq != pp->ndequeued) {
dq = pp->ndequeued;
dqt = VTIM_real();
} else if (VTIM_real() - dqt > cache_param->wthread_watchdog) {
dqt = VTIM_mono();
} else if (VTIM_mono() - dqt > cache_param->wthread_watchdog) {
VSL(SLT_Error, 0,
"Pool Herder: Queue does not move ql=%u dt=%f",
pp->lqueue, VTIM_real() - dqt);
pp->lqueue, VTIM_mono() - dqt);
WRONG("Worker Pool Queue does not move");
}
wthread_min = cache_param->wthread_min;

0 comments on commit 827cd22

Please sign in to comment.