mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
hash: raise hash table size
With slightly bigger hash tables, there is considerable less hash collisions.
This commit is contained in:
parent
ed1651d11f
commit
09a4b56895
@ -1,5 +1,6 @@
|
||||
Version 2.03.15 -
|
||||
===================================
|
||||
Increase some hash table size to better support large device sets.
|
||||
|
||||
Version 2.03.14 - 20th October 2021
|
||||
===================================
|
||||
|
@ -1167,7 +1167,7 @@ int config_def_check(struct cft_check_handle *handle)
|
||||
*vp = 0;
|
||||
*rp = 0;
|
||||
if (!handle->cmd->cft_def_hash) {
|
||||
if (!(handle->cmd->cft_def_hash = dm_hash_create(60))) {
|
||||
if (!(handle->cmd->cft_def_hash = dm_hash_create(500))) {
|
||||
log_error("Failed to create configuration definition hash.");
|
||||
r = 0; goto out;
|
||||
}
|
||||
|
@ -1246,7 +1246,7 @@ int dev_cache_init(struct cmd_context *cmd)
|
||||
if (!(_cache.mem = dm_pool_create("dev_cache", 10 * 1024)))
|
||||
return_0;
|
||||
|
||||
if (!(_cache.names = dm_hash_create(120)) ||
|
||||
if (!(_cache.names = dm_hash_create(1020)) ||
|
||||
!(_cache.vgid_index = dm_hash_create(30)) ||
|
||||
!(_cache.lvid_index = dm_hash_create(29))) {
|
||||
dm_pool_destroy(_cache.mem);
|
||||
|
@ -58,7 +58,7 @@ static int _init_hash(struct pfilter *pf)
|
||||
if (pf->devices)
|
||||
dm_hash_destroy(pf->devices);
|
||||
|
||||
if (!(pf->devices = dm_hash_create(111)))
|
||||
if (!(pf->devices = dm_hash_create(511)))
|
||||
return_0;
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user