Mercurial > hg > nginx
changeset 751:bae59a740c40
align hash bucket size to cache line
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 09 Oct 2006 14:03:16 +0000 |
parents | e3df50b4a4fd |
children | 907361d07f25 |
files | src/http/modules/ngx_http_fastcgi_module.c src/http/modules/ngx_http_proxy_module.c src/http/ngx_http.c src/http/ngx_http_upstream.c |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 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;
--- 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 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;
--- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -365,7 +365,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_comma 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;
--- 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_con 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;