
martin at varnish-cache
Aug 15, 2012, 5:00 AM
Post #1 of 1
(60 views)
Permalink
|
|
[3.0] 3993225 Initialize nthr_max on startup to avoid a race between wrk_herder_thread and wrk_herdtimer_thread causing bogus n_wrk_max stat increments.
|
|
commit 3993225fd998ebdf8e03d18105a7da65c3a83d8a Author: Martin Blix Grydeland <martin [at] varnish-software> Date: Wed Aug 15 13:51:40 2012 +0200 Initialize nthr_max on startup to avoid a race between wrk_herder_thread and wrk_herdtimer_thread causing bogus n_wrk_max stat increments. Fixes: #1183 diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c index 14679a5..3c13d69 100644 --- a/bin/varnishd/cache_pool.c +++ b/bin/varnishd/cache_pool.c @@ -593,6 +593,10 @@ WRK_Init(void) Lck_New(&herder_mtx, lck_herder); Lck_New(&wstat_mtx, lck_wstat); + nthr_max = params->wthread_max; + if (nthr_max < params->wthread_min) + nthr_max = params->wthread_min; + wrk_addpools(params->wthread_pools); AZ(pthread_create(&tp, NULL, wrk_herdtimer_thread, NULL)); AZ(pthread_detach(tp)); _______________________________________________ varnish-commit mailing list varnish-commit [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
|