align hash bucket size to cache line
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index e4b7ba4..cce3101 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1826,7 +1826,7 @@ 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 0e6bb1d..f854549 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1823,7 +1823,7 @@ 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 1c930ed..7a1eb89 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c
@@ -365,7 +365,7 @@ 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 7d259d0..ebc30be 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c
@@ -2941,7 +2941,7 @@ 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;