rhashtable_insert_fast(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌟

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