]> git.kaiwu.me - nginx.git/commitdiff
Adjusted default value of types_hash_bucket_size (ticket #352).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 Mar 2014 18:47:42 +0000 (22:47 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 Mar 2014 18:47:42 +0000 (22:47 +0400)
The ngx_cacheline_size may be too low on some platforms, resulting
in unexpected hash build problems (as no collisions are tolerated due
to low bucket_size, and max_size isn't big enough to build a hash without
collisions).  These problems aren't fatal anymore but nevertheless
need to be addressed.

src/http/ngx_http_core_module.c

index ac83f58b69f5bfe6ad76fa6779148fadec9f44d7..bfaa90e769cd3996d50f12823bcce1813bd156db 100644 (file)
@@ -3710,8 +3710,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
                               prev->types_hash_max_size, 1024);
 
     ngx_conf_merge_uint_value(conf->types_hash_bucket_size,
-                              prev->types_hash_bucket_size,
-                              ngx_cacheline_size);
+                              prev->types_hash_bucket_size, 64);
 
     conf->types_hash_bucket_size = ngx_align(conf->types_hash_bucket_size,
                                              ngx_cacheline_size);