[master] 8ae34bc ban lurker: extra ban_lurker_holdoff parameter

Nils Goroll nils.goroll at uplex.de
Tue May 3 16:31:06 CEST 2016


commit 8ae34bc7371bcecdd75ee1d3ebf12c73eba788ef
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Apr 18 21:01:24 2016 +0200

    ban lurker: extra ban_lurker_holdoff parameter

diff --git a/bin/varnishd/cache/cache_ban_lurker.c b/bin/varnishd/cache/cache_ban_lurker.c
index 6d038bb..1c3dfbe 100644
--- a/bin/varnishd/cache/cache_ban_lurker.c
+++ b/bin/varnishd/cache/cache_ban_lurker.c
@@ -131,7 +131,7 @@ ban_lurker_getfirst(struct vsl_log *vsl, struct ban *bt)
 		Lck_Unlock(&ban_mtx);
 		VSC_C_main->bans_lurker_contention++;
 		VSL_Flush(vsl, 0);
-		VTIM_sleep(cache_param->ban_lurker_sleep);
+		VTIM_sleep(cache_param->ban_lurker_holdoff);
 	}
 	return (oc);
 }
diff --git a/include/tbl/params.h b/include/tbl/params.h
index 2d6446a..3c03ce1 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -171,7 +171,7 @@ PARAM(
 	/* flags */	0,
 	/* s-text */
 	"How long the ban lurker sleeps after examining ${ban_lurker_batch} "
-	"objects and when it detects lock contention on object heads."
+	"objects."
 	"  Use this to pace the ban-lurker if it eats too many resources.\n"
 	"A value of zero will disable the ban lurker entirely.",
 	/* l-text */	"",
@@ -179,6 +179,21 @@ PARAM(
 )
 
 PARAM(
+	/* name */	ban_lurker_holdoff,
+	/* typ */	timeout,
+	/* min */	"0",
+	/* max */	NULL,
+	/* default */	"0.010",
+	/* units */	"seconds",
+	/* flags */	EXPERIMENTAL,
+	/* s-text */
+	"How long the ban lurker sleeps when giving way to lookup"
+	" due to lock contention.",
+	/* l-text */	"",
+	/* func */	NULL
+)
+
+PARAM(
 	/* name */	first_byte_timeout,
 	/* typ */	timeout,
 	/* min */	"0",



More information about the varnish-commit mailing list