svc_rdma_sq_wait(9)
ποΈ svc_rdma_sq_wait(9) β Kernel API Manual, but make it group-chat π
okay so welcome to the svc_rdma_sq_wait(9) page, bestie. This is the Kernel API Manual entry for the function that waits for SQ slots, and it is fair queuing from start to finish. Itβs giving organized line at a concert, not chaos at a sample sale. β¨
πΈ NAME πΈ
svc_rdma_sq_wait β wait for SQ slots using fair queuing. The queue has manners, and honestly? Iconic. π
π SYNOPSIS π
int svc_rdma_sq_wait (struct svcxprt_rdma *rdma , const struct rpc_rdma_cid *cid , int sqecount );
π ARGUMENTS π
rdmaβ the controlling transport. Itβs the transport in charge of this whole situation.cidβ completion ID for tracing. The little completion ID tag that tracing uses.sqecountβ number of SQ entries needed. Literally the count of Send Queue entries youβre asking for.
π DESCRIPTION π
A ticket-based system ensures fair ordering when multiple threads wait for Send Queue capacity. Each waiter takes a ticket and is served in order, preventing starvation. No thread left behind, periodt. π
Protocol invariant time, and this is not a drill: every ticket holder must increment sc_sq_ticket_tail exactly once, whether the reservation succeeds or the connection closes. Failing to advance the tail stalls all subsequent waiters. So if that increment does not happen, the whole line of waiters gets stuck. π
The ticket counters are signed 32-bit atomics. After wrapping through INT_MAX, the equality check (tail == ticket) remains correct, because both counters advance monotonically and the comparison uses exact equality rather than relational operators. The wrap is handled, bestie β the equality check said what it said. π«Ά
Return values:
0: SQ slots were reserved successfully.-ENOTCONN: The connection was lost.
π SEE ALSO π
Kernel file ./net/sunrpc/xprtrdma/svc_rdma_sendto.c
Also the whole related squad, no cap: svc_rdma_send_ctxts_destroy(9), svc_rdma_send_ctxt_get(9), svc_rdma_send_ctxts_drain(9), svc_rdma_send_ctxt_put(9), svc_rdma_wake_send_waiters(9), svc_rdma_post_send_err(9), svc_rdma_wc_send(9), svc_rdma_post_send(9), svc_rdma_encode_read_list(9), svc_rdma_encode_write_segment(9), svc_rdma_encode_write_chunk(9), svc_rdma_encode_write_list(9), svc_rdma_encode_reply_chunk(9), svc_rdma_page_dma_map(9), svc_rdma_iov_dma_map(9), svc_rdma_xb_dma_map(9), svc_rdma_xb_count_sges(9), svc_rdma_check_pull_up(9), svc_rdma_xb_linearize(9), svc_rdma_pull_up_reply_msg(9), svc_rdma_send_error_msg(9), svc_rdma_sendto(9), svc_rdma_result_payload(9)
Mwah π β this page is from ./net/sunrpc/xprtrdma, dated October 2026, for the svc_rdma_sq_wait(9) Kernel API Manual. 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