svc_rdma_release_ctxt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… svc_rdma_release_ctxt β€” okay so this is from the Kernel API Manual bestie, section 9 πŸŽ€

✨ NAME ✨

svc_rdma_release_ctxt β€” releases the transport-specific per-rqst resources, no cap πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void svc_rdma_release_ctxt (struct svc_xprt *xprt , void *vctxt );

Like, that's the whole signature. It returns void. It gives nothing back. It's giving humble. 🌸


πŸŽ€ ARGUMENTS πŸŽ€

  • xprt β€” the transport that owned the context, aka the one holding the receipts 🫢
  • vctxt β€” the context, and where does it come from? rqstp->rq_xprt_ctxt or dr->xprt_ctxt. Both. Either. You know the vibe. ✨

πŸ”₯ DESCRIPTION πŸ”₯

So the whole point, bestie: make sure that the recv_ctxt is released whether or not a Reply was ever sent. Like, sometimes the Reply just... doesn't happen 😭. Maybe the client closed the connection (rude), or maybe svc_process straight up dropped an RPC before the Reply got sent. Either way, this function has your back β€” no leaked context, periodt. πŸ’…

It also drains any send_ctxts queued for deferred release. Why do we care? Because that way the DMA unmap and the page release run in nfsd thread context, between RPCs, instead of on the Send completion path. Which is lowkey the whole flex. πŸ”₯ Like, keep that work off the completion path, please and thank you πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/sunrpc/xprtrdma/svc_rdma_recvfrom.c β€” go read it, iykyk 🧚


and that's the post πŸ«ΆπŸ’–βœ¨

Lil sign-off from me to you: this beauty lives in ./net/sunrpc/xprtrdma, dated October 2026 β€” mwah, eat it up, iconic, bye bestie πŸ’œπŸ“

πŸ“¦ where this page comes from