[master] 242dcf0 Add a counter for "killed from waiting list"

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 20 15:23:00 CEST 2014


commit 242dcf06affd7df5eca17ca23948000775446184
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 20 13:22:46 2014 +0000

    Add a counter for "killed from waiting list"

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 5f603b1..dc18cfe 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -539,7 +539,9 @@ hsh_rush(struct worker *wrk, struct objhead *oh)
 			 * In case of overloads, we ditch the entire
 			 * waiting list.
 			 */
+			wrk->stats->busy_wakeup--;
 			while (1) {
+				wrk->stats->busy_killed++;
 				AN (req->vcl);
 				VCL_Rel(&req->vcl);
 				sp = req->sp;
diff --git a/include/tbl/vsc_f_main.h b/include/tbl/vsc_f_main.h
index 7e592ef..f714e33 100644
--- a/include/tbl/vsc_f_main.h
+++ b/include/tbl/vsc_f_main.h
@@ -293,6 +293,12 @@ VSC_F(busy_wakeup,		uint64_t, 1, 'c', info,
 	" and rescheduled."
 )
 
+VSC_F(busy_killed,		uint64_t, 1, 'c', info,
+    "Number of requests killed after sleep on busy objhdr",
+	"Number of requests killed from the busy object sleep list"
+	" due to lack of resources."
+)
+
 VSC_F(sess_queued,		uint64_t, 0, 'c', info,
     "Sessions queued for thread",
 	"Number of times session was queued waiting for a thread."



More information about the varnish-commit mailing list