[master] 0c645dbf0 give vbp_mtx its own lock class

Nils Goroll nils.goroll at uplex.de
Tue Mar 10 09:21:09 UTC 2020


commit 0c645dbf093f76bf75fed05bc804d9e5cc6b7bd7
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Mar 10 10:17:21 2020 +0100

    give vbp_mtx its own lock class
    
    We used lck_backend both for vbp_mtx and for the mtx on individual
    backends.
    
    This lead to confusing results of the brinch hansons arrows produced by
    make witness.

diff --git a/bin/varnishd/cache/cache_backend_probe.c b/bin/varnishd/cache/cache_backend_probe.c
index 23721fb94..8d0bc41f7 100644
--- a/bin/varnishd/cache/cache_backend_probe.c
+++ b/bin/varnishd/cache/cache_backend_probe.c
@@ -748,7 +748,7 @@ VBP_Init(void)
 {
 	pthread_t thr;
 
-	Lck_New(&vbp_mtx, lck_backend);
+	Lck_New(&vbp_mtx, lck_probe);
 	vbp_heap = binheap_new(NULL, vbp_cmp, vbp_update);
 	AN(vbp_heap);
 	AZ(pthread_cond_init(&vbp_cond, NULL));
diff --git a/include/tbl/locks.h b/include/tbl/locks.h
index c3852dad8..026c24253 100644
--- a/include/tbl/locks.h
+++ b/include/tbl/locks.h
@@ -41,6 +41,7 @@ LOCK(lru)
 LOCK(mempool)
 LOCK(objhdr)
 LOCK(pipestat)
+LOCK(probe)
 LOCK(sess)
 LOCK(tcp_pool)
 LOCK(vbe)


More information about the varnish-commit mailing list