r5472 - in trunk/varnish-cache/bin: varnishd varnishtest/tests
phk at varnish-cache.org
phk at varnish-cache.org
Wed Oct 27 12:04:15 CEST 2010
Author: phk
Date: 2010-10-27 12:04:15 +0200 (Wed, 27 Oct 2010)
New Revision: 5472
Modified:
trunk/varnish-cache/bin/varnishd/cache_pool.c
trunk/varnish-cache/bin/varnishd/mgt_param.c
trunk/varnish-cache/bin/varnishtest/tests/m00001.vtc
Log:
Add a diag_bitmap that causes worker threads to release their VCL
after each request, so we do not have to contort testcases around
the exact scheduling of worker threads.
Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2010-10-27 09:27:03 UTC (rev 5471)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2010-10-27 10:04:15 UTC (rev 5472)
@@ -190,6 +190,8 @@
AZ(w->wfd);
assert(w->wlp == w->wlb);
w->wrq = NULL;
+ if (params->diag_bitmap & 0x00040000)
+ VCL_Rel(&w->vcl);
if (!Lck_Trylock(&wstat_mtx)) {
wrk_sumstat(w);
Lck_Unlock(&wstat_mtx);
Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c 2010-10-27 09:27:03 UTC (rev 5471)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2010-10-27 10:04:15 UTC (rev 5472)
@@ -771,6 +771,7 @@
#endif
" 0x00010000 - synchronize shmlog.\n"
" 0x00020000 - synchronous start of persistence.\n"
+ " 0x00040000 - release VCL early.\n"
" 0x80000000 - do edge-detection on digest.\n"
"Use 0x notation and do the bitor in your head :-)\n",
0,
Modified: trunk/varnish-cache/bin/varnishtest/tests/m00001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/m00001.vtc 2010-10-27 09:27:03 UTC (rev 5471)
+++ trunk/varnish-cache/bin/varnishtest/tests/m00001.vtc 2010-10-27 10:04:15 UTC (rev 5472)
@@ -17,6 +17,8 @@
}
} -start
+varnish v1 -cliok "param.set diag_bitmap 0x40000"
+
client c1 {
txreq -url "/bar"
rxresp
@@ -38,8 +40,6 @@
expect resp.http.bar == "fOo"
} -run
-client c1 -run
-
varnish v1 -cliok "debug.vmod"
varnish v1 -cliok "vcl.list"
@@ -49,8 +49,6 @@
varnish v1 -cliok "vcl.list"
varnish v1 -cliok "debug.vmod"
-client c1 -run
-
varnish v1 -badvcl {
import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so.1" ;
import std from "${topbuild}/lib/libvmod_std/.libs/libvmod_std.so.1" ;
More information about the varnish-commit
mailing list