svc_rdma_release_ctxt(9)
π 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_ctxtordr->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 π§
svc_rdma_recv_ctxts_destroy(9)svc_rdma_recv_ctxt_get(9)svc_rdma_recv_ctxt_put(9)svc_rdma_post_recvs(9)svc_rdma_wc_receive(9)svc_rdma_flush_recv_queues(9)xdr_count_read_segments(9)xdr_count_write_chunks(9)svc_rdma_xdr_decode_req(9)svc_rdma_recvfrom(9)
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
- 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