[master] 2f7cf29 Count the number of times a threadpool runs against the upper limit
Poul-Henning Kamp
phk at varnish-cache.org
Wed Sep 11 12:40:49 CEST 2013
commit 2f7cf2917239a8f0117945ff5b3d9b724d44dad9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Sep 11 10:40:26 2013 +0000
Count the number of times a threadpool runs against the upper limit
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index 4e7bd7c..4308fb3 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -404,8 +404,13 @@ pool_herder(void *priv)
}
Lck_Lock(&pp->mtx);
- if (!pp->dry)
+ if (!pp->dry) {
(void)Lck_CondWait(&pp->herder_cond, &pp->mtx, NULL);
+ } else {
+ /* XXX: unsafe counters */
+ VSC_C_main->threads_limited++;
+ pp->dry = 0;
+ }
Lck_Unlock(&pp->mtx);
}
NEEDLESS_RETURN(NULL);
More information about the varnish-commit
mailing list