svc_recv(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… svc_recv β€” like, the (9) manual, bestie πŸ’…

okay so welcome to svc_recv, straight outta the Kernel API Manual ✨ this is a kernel function, so it's section 9 energy, and it's lowkey one of those little workhorse functions that keeps your RPC service threads fed πŸ“


✨ SYNOPSIS ✨

int svc_recv (struct svc_rqst *rqstp , long timeo );

πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” an idle RPC service thread πŸ‘‘ like, this is the thread that's just chilling and waiting for something to do.
  • timeo β€” the timeout, measured in jiffies ⏱️ and yes, 0 means an infinite timeout (no cap, no limit, she waits forever πŸ’€).

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe of this function is: receive and process the next request on any transport πŸ’–

And ngl, the code is carefully organised β€” like, genuinely thought-through β€” so that it does not touch any cachelines in the shared svc_serv structure 😀 it only touches cachelines in the local svc_pool. that's the whole design flex, fr fr ✨

Also, important: if the timeout is 0, then the sleep will never time out 🫢 she's committed.

🌸 what it returns 🌸

  • -ETIMEDOUT β€” if it's been idle for an extended period 😭
  • -EBUSY β€” if there's more work to do than available threads πŸ™ˆ
  • 0 β€” otherwise πŸ’«

⭐ SEE ALSO ⭐

Kernel file ./net/sunrpc/svc_xprt.c πŸ’œ and the whole friend group:


πŸ’€ reminder bestie: timeo is in jiffies, not seconds, and 0 = infinite. do not come for me if you forget.

okay that's the whole page, mwah πŸ’‹ this iconic little entry lives in ./net/sunrpc, and the footer vibes are October 2026 with the name svc_recv(9) β€” periodt, that's the sign-off πŸŒˆπŸŽ€πŸ’…

πŸ“¦ where this page comes from