rhashtable_remove_fast(9)
π rhashtable_remove_fast β like, the Kernel API Manual page you actually wanna read
okay so bestie, welcome to the Kernel API Manual entry for rhashtable_remove_fast(9) β the one where we yeet an object OUT of a hash table. yes, that's the whole vibe. let's get into it π
β¨ NAME β¨
rhashtable_remove_fast β remove object from hash table
no cap, that's it. it removes objects from hash tables. the main character of today's episode π
πΈ SYNOPSIS πΈ
int rhashtable_remove_fast (struct rhashtable *ht , struct rhash_head *obj , const struct rhashtable_params params );
look at her. three params, one int return, zero drama (okay, minor drama, see below) β¨
π¦ ARGUMENTS π¦
htβ the hash table. the whole vibe. the bucket-holding queen herself πobjβ pointer to hash head inside object. not the object itself, bestie β thestruct rhash_headinside it. read that twice, iykyk πparamsβ hash table parameters. the settings. the config. the ~preferences~ π
π DESCRIPTION π
so here's the tea, and it's kind of a big deal: the hash chain is single linked. one-way. no going back. which means when you remove something, it has to walk the bucket chain to find it first π
and because of that walk? the removal operation is considerable slow if the hash table is not correctly sized. fr fr. size your table right or you're gonna have a bad time. it's giving "oops my bucket chain is a whole novel" energy π
the good news tho: it will automatically shrink the table if permitted, when residency drops below 30%. self-care!! the table literally declutters itself π§β¨
returns zero on success, and -ENOENT if the entry could not be found. that's it. that's the return value lore π
lowkey important: if you're seeing slow removals, that's not the table being mean, that's the table being undersized. check your sizing before you blame the kernel, bestie π«Ά
π₯ SEE ALSO π₯
okay this list is LONG and honestly iconic β we're shouting out the whole rhashtable family reunion π
- Kernel file
./include/linux/rhashtable.hstruct bucket_table(9) rht_grow_above_75(9)rht_shrink_below_30(9)rht_grow_above_100(9)rht_grow_above_max(9)rht_for_each_from(9)rht_for_each(9)rht_for_each_entry_from(9)rht_for_each_entry(9)rht_for_each_entry_safe(9)rht_for_each_rcu_from(9)rht_for_each_rcu(9)rht_for_each_entry_rcu_from(9)rht_for_each_entry_rcu(9)rhl_for_each_rcu(9)rhl_for_each_entry_rcu(9)rhashtable_lookup(9)rhashtable_lookup_fast(9)rhltable_lookup(9)rhashtable_insert_fast(9)rhltable_insert_key(9)rhltable_insert(9)rhashtable_lookup_insert_fast(9)rhashtable_lookup_get_insert_fast(9)rhashtable_lookup_insert_key(9)rhashtable_lookup_get_insert_key(9)rhltable_remove(9)rhashtable_replace_fast(9)rhltable_walk_enter(9)rhltable_free_and_destroy(9)
like, go read all of them. or don't. but they're there π
aaaand that's a wrap!! this page lives at ./include/linux, stamped October 2026, and it's literally called rhashtable_remove_fast(9) β so next time your bucket chain is too long, you know who to call π¦β¨ periodt π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms