relay_subbufs_consumed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… relay_subbufs_consumed β€” bestie's guide to the kernel API manual ✨

okay so like, the manual name is relay_subbufs_consumed(9) and honestly? it's giving "one tiny function that keeps the books balanced" and I'm obsessed. let's get into it πŸŽ€


🌸 NAME 🌸

relay_subbufs_consumed β€” update the buffer's sub-buffers-consumed count πŸ’«

like, that's literally it. it bumps a counter. main character energy for a counter, but still. 🫢


✨ SYNOPSIS ✨

void relay_subbufs_consumed (struct rchan *chan , unsigned int cpu ,
size_t subbufs_consumed );

no return value, so don't go looking for one, bestie β€” it's void, it says what it means πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • chan β€” the channel πŸ’– like, the whole relay channel you're working with, that's the vibe
  • cpu β€” the cpu associated with the channel buffer to update 🌈 because every cpu gets its own little buffer situation, iykyk
  • subbufs_consumed β€” number of sub-buffers to add to current buf's count ⭐ this is the delta, not the total, and that distinction is gonna matter in like two seconds, hold that thought

🧚 DESCRIPTION 🧚

so what does it actually do? it adds to the channel buffer's consumed sub-buffer count. that's the whole bit. ✨

and here's the part where I need you to lock in πŸ”₯: subbufs_consumed should be the number of sub-buffers newly consumed, not the total consumed. so if you hand it the running total, you're gonna double-count and the numbers will be a whole mess 😭 don't do that to yourself.

NOTE. Kernel clients don't need to call this function if the channel mode is 'overwrite'. πŸ’€ for real, if you're in 'overwrite' mode, just... don't. you're free. go live your life πŸ¦‹

πŸ’œ SEE ALSO πŸ’œ

all the sibling functions, the whole relay.c friend group, no cap πŸ‘‘

Kernel file ./kernel/relay.c:


and that's the whole page, bestie πŸŽ€ this one lives in ./kernel, dated October 2026, and it's the relay_subbufs_consumed(9) page from the Kernel API Manual. go forth and count your sub-buffers correctly, ily πŸ’–πŸ’…πŸ”₯

πŸ“¦ where this page comes from