relay_write(9)
π relay_write(9) β aka the Kernel API Manual, bestie edition β¨
Okay so like, hi, welcome to relay_write(9) from the Kernel API Manual π β this is the function you call when you literally just want your data to end up in the relay channel and you're not tryna overthink it. Let's get into it π¦
β¨ NAME β¨
relay_write β write data into the channel π«
πΈ SYNOPSIS πΈ
void relay_write (struct rchan *chan , const void *data , size_t length );
π ARGUMENTS π
chanβ the relay channel, obvi π«Άdataβ the actual data to be written, the main character of this whole operation πlengthβ number of bytes to write, so like, how much ofdatawe're serving up π
π₯ DESCRIPTION π₯
Writes data into the current cpu's channel buffer. That's it, that's the vibe β¨
It protects the buffer by disabling interrupts π‘οΈ β so slay, no cap, your buffer stays safe.
Use this if you might be logging from interrupt context π because that's literally the whole point of the interrupt-disabling protection. But if you know you won't be logging from interrupt context, then try __relay_write instead β she's the lighter-weight option, iykyk π
bestie pls note: the interrupt-disabling is doing real work here, so don't just casually swap in __relay_write unless you're 100% sure about your context fr fr π
π¦ SEE ALSO π¦
Kernel file ./include/linux/relay.h β plus __relay_write(9), relay_reserve(9), and subbuf_start_reserve(9) π
and that's the whole page, mwah π β this lil icon dropped from ./include/linux, dated October 2026, and it's the relay_write(9) page itself signing off π§πΈ go forth and log responsibly bestie β¨
π¦ 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