summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2026-03-04 00:04:06 +0300
committerFlorian Westphal <fw@strlen.de>2026-03-04 13:45:45 +0300
commit840aac3d900d09ec8fb8efe41bd7d09f9eb15538 (patch)
tree828b1061ed1d7acdab2edb022db2eedcab6a4d5b /lib/debugobjects.c
parentb655388111cf7e43f70e49db64bdaa42bcb8a038 (diff)
downloadlinux-840aac3d900d09ec8fb8efe41bd7d09f9eb15538.tar.xz
ipvs: use resizable hash table for services
Make the hash table for services resizable in the bit range of 4-20. Table is attached only while services are present. Resizing is done by delayed work based on load (the number of hashed services). Table grows when load increases 2+ times (above 12.5% with lfactor=-3) and shrinks 8+ times when load decreases 16+ times (below 0.78%). Switch to jhash hashing to reduce the collisions for multiple services. Add a hash_key field into the service to store the table ID in the highest bit and the entry's hash value in the lowest bits. The lowest part of the hash value is used as bucket ID, the remaining part is used to filter the entries in the bucket before matching the keys and as result, helps the lookup operation to access only one cache line. By knowing the table ID and bucket ID for entry, we can unlink it without calculating the hash value and doing lookup by keys. We need only to validate the saved hash_key under lock. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions