Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294485
b: refs/heads/master
c: 15a4520
h: refs/heads/master
i:
  294483: b47fed1
v: v3
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed Feb 16, 2012
1 parent d68d508 commit 25312f1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d96e80faff57b9eefa283b35716a384bbb3d5b3
refs/heads/master: 15a4520621824a3c2eb2de2d1f3984bc1663d3c8
2 changes: 1 addition & 1 deletion trunk/include/linux/nfs_iostat.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef _LINUX_NFS_IOSTAT
#define _LINUX_NFS_IOSTAT

#define NFS_IOSTAT_VERS "1.0"
#define NFS_IOSTAT_VERS "1.1"

/*
* NFS byte counters
Expand Down
7 changes: 5 additions & 2 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,13 @@ struct rpc_xprt {
connect_time, /* jiffies waiting for connect */
sends, /* how many complete requests */
recvs, /* how many complete requests */
bad_xids; /* lookup_rqst didn't find XID */
bad_xids, /* lookup_rqst didn't find XID */
max_slots; /* max rpc_slots used */

unsigned long long req_u, /* average requests on the wire */
bklog_u; /* backlog queue utilization */
bklog_u, /* backlog queue utilization */
sending_u, /* send q utilization */
pending_u; /* pend q utilization */
} stat;

struct net *xprt_net;
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ void xprt_transmit(struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt;
int status;
int status, numreqs;

dprintk("RPC: %5u xprt_transmit(%u)\n", task->tk_pid, req->rq_slen);

Expand Down Expand Up @@ -922,9 +922,14 @@ void xprt_transmit(struct rpc_task *task)

xprt->ops->set_retrans_timeout(task);

numreqs = atomic_read(&xprt->num_reqs);
if (numreqs > xprt->stat.max_slots)
xprt->stat.max_slots = numreqs;
xprt->stat.sends++;
xprt->stat.req_u += xprt->stat.sends - xprt->stat.recvs;
xprt->stat.bklog_u += xprt->backlog.qlen;
xprt->stat.sending_u += xprt->sending.qlen;
xprt->stat.pending_u += xprt->pending.qlen;

/* Don't race with disconnect */
if (!xprt_connected(xprt))
Expand Down
23 changes: 17 additions & 6 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ static void xs_local_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
idle_time = (long)(jiffies - xprt->last_used) / HZ;

seq_printf(seq, "\txprt:\tlocal %lu %lu %lu %ld %lu %lu %lu "
"%llu %llu\n",
"%llu %llu %lu %llu %llu\n",
xprt->stat.bind_count,
xprt->stat.connect_count,
xprt->stat.connect_time,
Expand All @@ -2236,7 +2236,10 @@ static void xs_local_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
xprt->stat.recvs,
xprt->stat.bad_xids,
xprt->stat.req_u,
xprt->stat.bklog_u);
xprt->stat.bklog_u,
xprt->stat.max_slots,
xprt->stat.sending_u,
xprt->stat.pending_u);
}

/**
Expand All @@ -2249,14 +2252,18 @@ static void xs_udp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
{
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);

seq_printf(seq, "\txprt:\tudp %u %lu %lu %lu %lu %Lu %Lu\n",
seq_printf(seq, "\txprt:\tudp %u %lu %lu %lu %lu %llu %llu "
"%lu %llu %llu\n",
transport->srcport,
xprt->stat.bind_count,
xprt->stat.sends,
xprt->stat.recvs,
xprt->stat.bad_xids,
xprt->stat.req_u,
xprt->stat.bklog_u);
xprt->stat.bklog_u,
xprt->stat.max_slots,
xprt->stat.sending_u,
xprt->stat.pending_u);
}

/**
Expand All @@ -2273,7 +2280,8 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
if (xprt_connected(xprt))
idle_time = (long)(jiffies - xprt->last_used) / HZ;

seq_printf(seq, "\txprt:\ttcp %u %lu %lu %lu %ld %lu %lu %lu %Lu %Lu\n",
seq_printf(seq, "\txprt:\ttcp %u %lu %lu %lu %ld %lu %lu %lu "
"%llu %llu %lu %llu %llu\n",
transport->srcport,
xprt->stat.bind_count,
xprt->stat.connect_count,
Expand All @@ -2283,7 +2291,10 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
xprt->stat.recvs,
xprt->stat.bad_xids,
xprt->stat.req_u,
xprt->stat.bklog_u);
xprt->stat.bklog_u,
xprt->stat.max_slots,
xprt->stat.sending_u,
xprt->stat.pending_u);
}

/*
Expand Down

0 comments on commit 25312f1

Please sign in to comment.