/**
* total 256 buckets, we don't want too many buckets because:
* - consume too much memory
/**
* total 256 buckets, we don't want too many buckets because:
* - consume too much memory
/*
* Calculate hash table size, assuming that we want reasonable
* performance when 20% of total memory is occupied by cache of
/*
* Calculate hash table size, assuming that we want reasonable
* performance when 20% of total memory is occupied by cache of
snprintf(name, sizeof(name), "lu_site_%s", top->ld_type->ldt_name);
snprintf(name, sizeof(name), "lu_site_%s", top->ld_type->ldt_name);
- for (bits = clamp_t(typeof(bits), bits,
- LU_SITE_BITS_MIN, LU_SITE_BITS_MAX);
+ for (bits = lu_htable_order(top);
bits >= LU_SITE_BITS_MIN; bits--) {
s->ls_obj_hash = cfs_hash_create(name, bits, bits,
bits - LU_SITE_BKT_BITS,
bits >= LU_SITE_BITS_MIN; bits--) {
s->ls_obj_hash = cfs_hash_create(name, bits, bits,
bits - LU_SITE_BKT_BITS,