rht_for_each_entry_rcu_from(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

hey bestie, welcome to rht_for_each_entry_rcu_from(9) in the Kernel API Manual β€” yes, the title is a whole mouthful, and the vibe is iterating over an rcu hash chain from a given head. The official one-liner is rht_for_each_entry_rcu_from β€” iterated over rcu hash chain from given head. πŸ¦‹


🌸 SYNOPSIS 🌸

exact call shape, character for character, no edits, periodt:

rht_for_each_entry_rcu_from (tpos , pos , head , tbl , hash , member );

πŸ’… ARGUMENTS πŸ’…

okay so here’s the cast, bestie β€” every single one matters:

  • tpos β€” the type * to use as a loop cursor. πŸŽ€
  • pos β€” the struct rhash_head to use as a loop cursor.
  • head β€” the struct rhash_head to start from.
  • tbl β€” the struct bucket_table.
  • hash β€” the hash value / bucket index.
  • member β€” name of the struct rhash_head within the hashable struct.

πŸ”₯ DESCRIPTION πŸ”₯

okay so this is a hash chain list-traversal primitive, and the main character energy is that it may safely run concurrently with the _rcu mutation primitives such as rhashtable_insert β€” as long as the traversal is guarded by rcu_read_lock. That’s the whole safety vibe. No cap.

fr fr, do not skip the rcu_read_lock guard: the safety promise is literally tied to it. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./include/linux/rhashtable.h, plus the whole friend group: struct 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(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). 🫢


mwah πŸ’‹ β€” source/version says ./include/linux, date says October 2026, and the page is rht_for_each_entry_rcu_from(9). stay slay, bestie 🫢✨

πŸ“¦ where this page comes from