Re: Why n_buckets is at least max_entries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 15, 2020 at 1:44 PM Cong Wang <xiyou.wangcong@xxxxxxxxx> wrote:
>
> Hello,
>
> Any reason why we allocate at least max_entries of buckets of a hash map?
>
>  466
>  467         /* hash table size must be power of 2 */
>  468         htab->n_buckets = roundup_pow_of_two(htab->map.max_entries);

because hashmap performance matters a lot.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux