svc_recv(9)
π
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,0means 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:
svc_reg_xprt_class(9)svc_unreg_xprt_class(9)svc_print_xprts(9)svc_xprt_deferred_close(9)svc_xprt_received(9)svc_xprt_create_from_sa(9)svc_xprt_create(9)svc_print_addr(9)svc_xprt_enqueue(9)svc_reserve(9)svc_wake_up(9)svc_send(9)svc_xprt_close(9)svc_xprt_destroy_all(9)svc_find_listener(9)svc_find_xprt(9)svc_xprt_names(9)
π reminder bestie:timeois in jiffies, not seconds, and0= 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
- 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