rhashtable_insert_fast(9)
π rhashtable_insert_fast(9) π
okay so welcome to the kernel API manual, bestie β today's main character is rhashtable_insert_fast, and honestly? she's that girl. let's get into it β¨
πΈ NAME πΈ
rhashtable_insert_fast β insert object into hash table π
π¦ SYNOPSIS π¦
int rhashtable_insert_fast (struct rhashtable *ht , struct rhash_head
*obj , const struct rhashtable_params params );
literally the whole flex, right there π
π ARGUMENTS π
htβ hash table. the vibe container itself π«Άobjβ pointer to hash head inside object. not the object, bestie, the head inside it β read the room πparamsβ hash table parameters. the little settings moment π
π DESCRIPTION π
okay so here's the tea β β this function will take the per bucket bitlock to protect against mutual mutations on the same bucket. so like, buckets are doing their own little locked-down self-care routine and nobody's getting mutated mid-moment π₯
multiple insertions may occur in parallel unless they map to the same bucket. so if your inserts land in different buckets, they can all slay simultaneously β but if two of them show up to the same bucket? yeah that's a collision, they're waiting in line, periodt π
it is safe to call this function from atomic context. no cap β atomic context is fine, she's built different β
will trigger an automatic deferred table resizing if residency in the table grows beyond 70%. so once the table gets 70% full, the resize just happens, deferred style, very effortless very demure π§
ngl, this is the good one: bucket-level locking, atomic-context safe, and auto-grow all in one call. iconic behavior only π
π SEE ALSO π
- 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)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)
like, that's the whole friend group right there β go say hi, iykyk π
and that's the page, bestie!! π this little drop came to you from <pink>./include/linux</pink> and it's dated October 2026 β yeah, time traveler energy, we don't question it πβ¨ bye pookie, go insert some objects π
π¦ 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