[master] f9848a6 Allocate the LRU list in the child process instead of the master process.

Poul-Henning Kamp phk at varnish-cache.org
Wed Feb 9 11:40:28 CET 2011


commit f9848a68d071478d3a0c5db5760ca4723e8d848f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 9 10:40:10 2011 +0000

    Allocate the LRU list in the child process instead of the master
    process.

diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c
index 4865eaf..5b165e1 100644
--- a/bin/varnishd/stevedore.c
+++ b/bin/varnishd/stevedore.c
@@ -377,12 +377,15 @@ STV_open(void)
 	struct stevedore *stv;
 
 	VTAILQ_FOREACH(stv, &stevedores, list) {
+		stv->lru = LRU_Alloc();
 		if (stv->open != NULL)
 			stv->open(stv);
 	}
 	stv = stv_transient;
-	if (stv->open != NULL)
+	if (stv->open != NULL) {
+		stv->lru = LRU_Alloc();
 		stv->open(stv);
+	}
 }
 
 void
@@ -477,8 +480,6 @@ STV_Config(const char *spec)
 		    stv->ident, stv->name);
 	}
 
-	stv->lru = LRU_Alloc();
-
 	if (stv->init != NULL)
 		stv->init(stv, ac, av);
 	else if (ac != 0)



More information about the varnish-commit mailing list