|
Hello,
On Mon, 24 Nov 2025, Pablo Neira Ayuso wrote:
> On Sun, Oct 19, 2025 at 06:57:04PM +0300, Julian Anastasov wrote:
> > Add infrastructure for resizable hash tables based on hlist_bl
> > which we will use in followup patches.
> >
> > The tables allow RCU lookups during resizing, bucket modifications
> > are protected with per-bucket bit lock and additional custom locking,
> > the tables are resized when load reaches thresholds determined based
> > on load factor parameter.
>
> I understand the generic rhashtable implementation cannot be used in
> this case, but I am missing the reason why (comparison?).
The main differences are:
- our hash keys are not on contiguous memory, need to fit
properly in cachelines
- we avoid IRQ locks: local_irq_save/local_irq_restore
- we will use double hashing for NAT
- we allow entries with duplicate keys, for performance reasons
- we do not lookup the entry that is to be removed, we know its
table and bucket id and unlink it with hlist_bl_del_rcu
- we prefer to customize the grow/shrink process
Regards
--
Julian Anastasov <ja@xxxxxx>
|