diff options
author | Chuck Lever <cel@netapp.com> | 2005-08-25 19:25:53 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:45 -0400 |
commit | a58dd398f5db4f73d5c581069fd70a4304cc4f0a (patch) | |
tree | 09e290d351c043392e7a2f8e0bc77aba90ff88ad /net/sunrpc/xprt.c | |
parent | 1570c1e41eabf6b7031f3e4322a2cf1cbe319fee (diff) |
[PATCH] RPC: add a release_rqst callout to the RPC transport switch
The final place where congestion control state is adjusted is in
xprt_release, where each request is finally released. Add a callout
there to allow transports to perform additional processing when a
request is about to be released.
Test-plan:
Use WAN simulation to cause sporadic bursty packet loss. Look for significant
regression in performance or client stability.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r-- | net/sunrpc/xprt.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 707806fe1a23..e8d11bd6158e 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -290,6 +290,17 @@ __xprt_put_cong(struct rpc_xprt *xprt, struct rpc_rqst *req) | |||
290 | } | 290 | } |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * xprt_release_rqst_cong - housekeeping when request is complete | ||
294 | * @task: RPC request that recently completed | ||
295 | * | ||
296 | * Useful for transports that require congestion control. | ||
297 | */ | ||
298 | void xprt_release_rqst_cong(struct rpc_task *task) | ||
299 | { | ||
300 | __xprt_put_cong(task->tk_xprt, task->tk_rqstp); | ||
301 | } | ||
302 | |||
303 | /** | ||
293 | * xprt_adjust_cwnd - adjust transport congestion window | 304 | * xprt_adjust_cwnd - adjust transport congestion window |
294 | * @task: recently completed RPC request used to adjust window | 305 | * @task: recently completed RPC request used to adjust window |
295 | * @result: result code of completed RPC request | 306 | * @result: result code of completed RPC request |
@@ -823,7 +834,8 @@ void xprt_release(struct rpc_task *task) | |||
823 | return; | 834 | return; |
824 | spin_lock_bh(&xprt->transport_lock); | 835 | spin_lock_bh(&xprt->transport_lock); |
825 | xprt->ops->release_xprt(xprt, task); | 836 | xprt->ops->release_xprt(xprt, task); |
826 | __xprt_put_cong(xprt, req); | 837 | if (xprt->ops->release_request) |
838 | xprt->ops->release_request(task); | ||
827 | if (!list_empty(&req->rq_list)) | 839 | if (!list_empty(&req->rq_list)) |
828 | list_del(&req->rq_list); | 840 | list_del(&req->rq_list); |
829 | xprt->last_used = jiffies; | 841 | xprt->last_used = jiffies; |