align hash bucket size to cache line

This commit is contained in:
Igor Sysoev 2006-10-09 14:03:16 +00:00
parent 627b8aa3bd
commit aec57e2613
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;