aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-09 14:03:16 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-09 14:03:16 +0000
commitaec57e2613f2fae3f952f2ca806d8e55ab4bf332 (patch)
treeec597afa78112894b640cb38cdd64017bedb07fb /src
parent627b8aa3bd8ec4ebff1d08ade3a6d17de8fa7bf1 (diff)
downloadnginx-aec57e2613f2fae3f952f2ca806d8e55ab4bf332.tar.gz
nginx-aec57e2613f2fae3f952f2ca806d8e55ab4bf332.zip
align hash bucket size to cache line
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c2
-rw-r--r--src/http/modules/ngx_http_proxy_module.c2
-rw-r--r--src/http/ngx_http.c2
-rw-r--r--src/http/ngx_http_upstream.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index e4b7ba431..cce31010c 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1826,7 +1826,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
hash.hash = &conf->upstream.hide_headers_hash;
hash.key = ngx_hash_key_lc;
hash.max_size = 512;
- hash.bucket_size = 64;
+ hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "fastcgi_hide_headers_hash";
hash.pool = cf->pool;
hash.temp_pool = NULL;
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 0e6bb1d6f..f85454968 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1823,7 +1823,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
hash.hash = &conf->upstream.hide_headers_hash;
hash.key = ngx_hash_key_lc;
hash.max_size = 512;
- hash.bucket_size = 64;
+ hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "proxy_hide_headers_hash";
hash.pool = cf->pool;
hash.temp_pool = NULL;
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 1c930ed2e..7a1eb89b3 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -365,7 +365,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
hash.hash = &cmcf->headers_in_hash;
hash.key = ngx_hash_key_lc;
hash.max_size = 512;
- hash.bucket_size = 64;
+ hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "headers_in_hash";
hash.pool = cf->pool;
hash.temp_pool = NULL;
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 7d259d098..ebc30be3e 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2941,7 +2941,7 @@ ngx_http_upstream_init_main_conf(ngx_conf_t *cf, void *conf)
hash.hash = &umcf->headers_in_hash;
hash.key = ngx_hash_key_lc;
hash.max_size = 512;
- hash.bucket_size = 64;
+ hash.bucket_size = ngx_align(64, ngx_cacheline_size);
hash.name = "upstream_headers_in_hash";
hash.pool = cf->pool;
hash.temp_pool = NULL;