From fdc1ef379d68781c762030c7f42166b3ad6dc205 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 11 Aug 2006 14:09:09 +0000 Subject: [PATCH] Use 1:1 for hashbucket:mutex ratio git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@813 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/hash_classic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/hash_classic.c b/varnish-cache/bin/varnishd/hash_classic.c index e6c6971c..d01b64b6 100644 --- a/varnish-cache/bin/varnishd/hash_classic.c +++ b/varnish-cache/bin/varnishd/hash_classic.c @@ -40,7 +40,7 @@ TAILQ_HEAD(hcl_head, hcl_entry); static struct hcl_head *hcl_head; static unsigned hcl_nhash = 4096; -static unsigned hcl_nmtx = 256; +static unsigned hcl_nmtx = 4096; static pthread_mutex_t *hcl_mutex; /*--------------------------------------------------------------------*/ @@ -131,7 +131,7 @@ hcl_init(const char *p) } hcl_nhash = u1; if (i == 1) { - hcl_nmtx = hcl_nhash / 16; + hcl_nmtx = hcl_nhash; if (hcl_nmtx < 1) hcl_nmtx = 1; return(0); -- 2.39.5