seq_hlist_start_head_rcu(9)
π seq_hlist_start_head_rcu(9) π
okay so you're reading the Kernel API Manual bestie, and this one is literally about kicking off an iteration of an hlist that's protected by RCU. yes THAT RCU. buckle up π
β¨ NAME β¨
seq_hlist_start_head_rcu β start an iteration of a hlist protected by RCU π¦
πΈ SYNOPSIS πΈ
struct hlist_node * seq_hlist_start_head_rcu (struct hlist_head *head ,
loff_t pos );
like, that's the whole signature, no cap β¨
π ARGUMENTS π
headβ the head of the hlist, aka where the whole thing begins πposβ the start position of the sequence, so you know where you're jumping in π
π DESCRIPTION π
so this one gets called at seq_file->op->start, periodt. and the vibe check is: call this function if you want to print a header at the top of the output. that's the whole reason it's the head version, iykyk π
this list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu β like, it's genuinely fine β as long as the traversal is guarded by rcu_read_lock. do not skip the guard, bestie, that's the whole contract ππ
π«Ά SEE ALSO π«Ά
the kernel file ./fs/seq_file.c has the whole fam:
seq_open(9)seq_read(9)seq_lseek(9)seq_release(9)seq_escape_mem(9)seq_mangle_path(9)seq_path(9)seq_file_path(9)seq_put_decimal_ull_width(9)seq_put_hex_ll(9)seq_write(9)seq_pad(9)seq_hlist_start(9)seq_hlist_start_head(9)seq_hlist_next(9)seq_hlist_start_rcu(9)seq_hlist_next_rcu(9)seq_hlist_start_percpu(9)seq_hlist_next_percpu(9)
like an entire friend group, obsessed ππ
and that's the page!! this one lives in ./fs and it's dated October 2026, so screenshot it for the group chat before it's vintage π§β bye bestie, go guard your traversal with rcu_read_lock π
π¦
π¦ 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