xs_tcp_write_space(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 xs_tcp_write_space(9) β€” like, the socket write-space callback 🌸

okay bestie, welcome to the xs_tcp_write_space(9) page, live from the Kernel API Manual πŸ’– this one is short and sweet but she is important, so let's get into it.


✨ NAME ✨

xs_tcp_write_space β€” the callback that gets invoked when socket buffer space becomes available πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void xs_tcp_write_space (struct sock *sk );

that's it. that's the whole signature. no cap. πŸ’…


🌸 ARGUMENTS 🌸

  • sk β€” the socket whose state has changed, bestie. that's the one we're talking about 🫢

πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe: this gets called when more output buffer space is available for this socket ✨ that's the whole trigger, no secret lore.

But here's the part everyone always asks about β€” we do not just immediately wake up our writers the second there's a crumb of space. nope! we try not to wake our writers until they can make "significant" progress πŸ‘‘

why? because otherwise we'll waste resources thrashing kernel_sendmsg with a bunch of small requests 😭 like, imagine waking someone up for one single grape. embarrassing. so we wait until there's actually enough room for the writers to do something real. main character energy only. πŸ”₯

fr fr, the whole point of not waking writers early is so we're not out here burning resources on tiny sends. respect the buffer. 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/sunrpc/xprtsock.c plus literally all of these:


okay that's the page!! go read the rest of the xprtsock girlies when you're done, they all live together πŸ’…

this came from ./net/sunrpc, dated October 2026 β€” mwah, sending you off with a kiss πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from