]> git.ipfire.org Git - thirdparty/bird.git/commit
Unlocking the global attribute cache
authorKaterina Kubecova <katerina.kubecova@nic.cz>
Fri, 31 Jan 2025 10:13:26 +0000 (11:13 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 19 Feb 2025 12:52:16 +0000 (13:52 +0100)
commit2a7735d28cfc85eaf676ca52b3538d9150e43396
tree77e536c8f8a1d4d9ca42f959edc7583ea75f2a31
parente6fd0b02513be69cb998989532d1f2672c51504d
Unlocking the global attribute cache

Now, when we have the unlocked slab, we can also go for a completely
lockless global attribute cache, which has been the major contention
point in BIRD 3.

This is a complicated data structure, basically a lockless hash table
with use-counted items inside, allowing concurrent insertions and
deletions.

Hash tables have to dynamically resize its base array, and the rehash
routine runs from an event if needed.

Also, due to some funny meta-race conditions, it is now possible to
end up with multiple ea_list_storage instances with the same contents,
yet it looks like it happens very rarely. (Prove us wrong, we dare you!)
lib/route.h
nest/rt-attr.c