rht_for_each_rcu(9)
π NAME π
okay so bestie, you're on the rht_for_each_rcu(9) page in the Kernel API Manual, and the whole point is literally: iterate over rcu hash chain. no cap. π
β¨ SYNOPSIS β¨
rht_for_each_rcu (pos , tbl , hash );
π¦ ARGUMENTS π¦
posβ thestruct rhash_headto use as a loop cursor. that's your main character pointer fr fr.tblβ thestruct bucket_table. the table you're cruising through, lowkey.hashβ the hash value / bucket index. the lil address vibe that tells you which chain to hit.
π₯ DESCRIPTION π₯
This hash chain list-traversal primitive may safely run concurrently with the _rcu mutation primitives such as rhashtable_insert as long as the traversal is guarded by rcu_read_lock.
bestie, read that again: concurrent-safe is conditional. the rcu_read_lock guard is not optional, periodt. π
π SEE ALSO π
The kernel file ./include/linux/rhashtable.h is in the group chat, along with:
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_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)
mwah π β this page's source/version footer says ./include/linux, dated October 2026, and it's still the rht_for_each_rcu(9) page. π«Ά
π¦ 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