comparison src/http/ngx_http_upstream.c @ 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 63b9dc652c3d
comparison
equal deleted inserted replaced
750:e3df50b4a4fd 751:bae59a740c40
2939 } 2939 }
2940 2940
2941 hash.hash = &umcf->headers_in_hash; 2941 hash.hash = &umcf->headers_in_hash;
2942 hash.key = ngx_hash_key_lc; 2942 hash.key = ngx_hash_key_lc;
2943 hash.max_size = 512; 2943 hash.max_size = 512;
2944 hash.bucket_size = 64; 2944 hash.bucket_size = ngx_align(64, ngx_cacheline_size);
2945 hash.name = "upstream_headers_in_hash"; 2945 hash.name = "upstream_headers_in_hash";
2946 hash.pool = cf->pool; 2946 hash.pool = cf->pool;
2947 hash.temp_pool = NULL; 2947 hash.temp_pool = NULL;
2948 2948
2949 if (ngx_hash_init(&hash, headers_in.elts, headers_in.nelts) != NGX_OK) { 2949 if (ngx_hash_init(&hash, headers_in.elts, headers_in.nelts) != NGX_OK) {