aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2006-03-20 13:44:22 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:22 -0500
commit11c556b3d8d481829ab5f9933a25d29b00913b5a (patch)
treed1127fa5d22aeb035ca9977abbc73a29d5436fbe /net/sunrpc/xprt.c
parentef759a2e54ed434b2f72b52a14edecd6d4eadf74 (diff)
SUNRPC: provide a mechanism for collecting stats in the RPC client
Add a simple mechanism for collecting stats in the RPC client. Stats are tabulated during xprt_release. Note that per_cpu shenanigans are not required here because the RPC client already serializes on the transport write lock. Test plan: Compile kernel with CONFIG_NFS enabled. Basic performance regression testing with high-speed networking and high performance server. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index c6241976a6ee..eb5a262e024e 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -44,6 +44,7 @@
44#include <linux/random.h> 44#include <linux/random.h>
45 45
46#include <linux/sunrpc/clnt.h> 46#include <linux/sunrpc/clnt.h>
47#include <linux/sunrpc/metrics.h>
47 48
48/* 49/*
49 * Local variables 50 * Local variables
@@ -859,6 +860,7 @@ void xprt_release(struct rpc_task *task)
859 860
860 if (!(req = task->tk_rqstp)) 861 if (!(req = task->tk_rqstp))
861 return; 862 return;
863 rpc_count_iostats(task);
862 spin_lock_bh(&xprt->transport_lock); 864 spin_lock_bh(&xprt->transport_lock);
863 xprt->ops->release_xprt(xprt, task); 865 xprt->ops->release_xprt(xprt, task);
864 if (xprt->ops->release_request) 866 if (xprt->ops->release_request)