rht_shrink_below_30(9)
π rht_shrink_below_30 β Kernel API Manual (section 9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β yes, the function-man page section, we love a numbered era. today's main character is rht_shrink_below_30, and her whole job is honestly so real of her, i'll explain β¨
πΈ NAME πΈ
rht_shrink_below_30 β she returns true if nelems < 0.3 * table-size π¦
like literally that's it. that's the whole vibe check. she looks at your numbers and goes "hmm, that's less than thirty percent of the table size" and she's right every time, no cap π
β¨ SYNOPSIS β¨
bool rht_shrink_below_30 (const struct rhashtable *ht , const struct
bucket_table *tbl );
note the return type bestie β bool, not int, not a pointer, a whole bool. she's decisive. she's giving main character energy. π
π«Ά ARGUMENTS π«Ά
htβ the hash table π (yes,htstands for hash table, we been knew)tblβ the current table π
that's the whole cast list. two icons, one job. periodt.
π₯ SEE ALSO π₯
okay this section is long and honestly iconic for it β the whole rhashtable friend group showed up. every single one of them, in order, because we don't skip anyone in this house π§
- Kernel file
./include/linux/rhashtable.hβ and specificallystruct bucket_table(9), which is lowkey the blueprint of the whole situation rht_grow_above_75(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)rhashtable_remove_fast(9)rhltable_remove(9)rhashtable_replace_fast(9)rhltable_walk_enter(9)rhltable_free_and_destroy(9)
thirty of them. thirty!! the way that she has thirty mutuals in the SEE ALSO section and still keeps it cute ππ iykyk
heads up bestie:rht_shrink_below_30is the threshold check, not the shrink itself. she tells you if you're below0.3 * table-sizeand returnstruewhen you are β read the grow/shrink neighbours above for the rest of the story π¦
and that's the page!! sourced from ./include/linux, dated October 2026, filed under rht_shrink_below_30(9) β mwah, stan her, drink water, and go read your rhashtable.h πβ¨π
π¦ 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