xprt_adjust_cwnd(9)
π
xprt_adjust_cwnd(9) β like, the whole vibe π
okay so bestie, we're in the Kernel API Manual today and this function is genuinely iconic. her whole job? adjusting the transport congestion window. that's it. that's the gig. let's get into it π
β¨ NAME β¨
xprt_adjust_cwnd β adjust transport congestion window
πΈ SYNOPSIS πΈ
void xprt_adjust_cwnd (struct rpc_xprt *xprt , struct rpc_task *task ,
int result );
π¦ ARGUMENTS π¦
xprtβ pointer toxprt. literally just a pointer, she's pointing at the transport, slay.taskβ the recently completed RPC request that gets used to adjust the window πresultβ the result code of that completed RPC request
π DESCRIPTION π
so the transport code keeps an estimate of the max number of outstanding RPC requests, and it does that using a smoothed version of the congestion avoidance implemented in 44BSD. yes, the whole thing is basically the Van Jacobson congestion algorithm β no cap, that's the blueprint π₯
here's the tea on how it behaves:
- if a retransmit occurs, the congestion window is halved π
- otherwise, it's incremented by
1/cwndwhen all of the following are true:- a reply is received
- a full number of requests are outstanding
- the congestion window hasn't been updated recently
like, all three. every time. she's picky and honestly? respect. periodt π«Ά
π SEE ALSO π
kernel file ./net/sunrpc/xprt.c, plus the whole friend group:
xprt_register_transport(9), xprt_unregister_transport(9), xprt_find_transport_ident(9), xprt_reserve_xprt(9), xprt_release_xprt(9), xprt_release_xprt_cong(9), xprt_request_get_cong(9), xprt_release_rqst_cong(9), xprt_wake_pending_tasks(9), xprt_wait_for_buffer_space(9), xprt_write_space(9), xprt_adjust_timeout(9), xprt_disconnect_done(9), xprt_schedule_autoclose_locked(9), xprt_force_disconnect(9), xprt_conditional_disconnect(9), xprt_connect(9), xprt_reconnect_delay(9), xprt_reconnect_backoff(9), xprt_lookup_rqst(9), xprt_pin_rqst(9), xprt_unpin_rqst(9), xprt_request_enqueue_receive(9), xprt_request_dequeue_receive_locked(9), xprt_update_rtt(9), xprt_complete_rqst(9), xprt_wait_for_reply_request_def(9), xprt_wait_for_reply_request_rtt(9), xprt_request_wait_receive(9), xprt_request_enqueue_transmit(9), xprt_request_dequeue_transmit_locked(9), xprt_request_dequeue_transmit(9), xprt_request_dequeue_xprt(9), xprt_request_prepare(9), xprt_request_need_retransmit(9), xprt_prepare_transmit(9), xprt_request_transmit(9), xprt_transmit(9), xprt_add_backlog_noncongested(9), xprt_reserve(9), xprt_retry_reserve(9), xprt_release(9), xprt_create_transport(9), xprt_destroy(9), xprt_get(9), xprt_put(9)
and that's the page!! π§ she lives in ./net/sunrpc, dated October 2026, and yes the manual section is still xprt_adjust_cwnd(9) because we keep it consistent, bestie π mwah, go adjust some cwnd π
β¨
π¦ 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