15 #include <linux/module.h>
16 #include <linux/slab.h>
19 #include <linux/kernel.h>
29 #define RPCDBG_FACILITY RPCDBG_MISC
34 static int rpc_proc_show(
struct seq_file *seq,
void *
v) {
51 for (i = 0; i < prog->
nrvers; i++) {
57 for (j = 0; j < vers->
nrprocs; j++)
59 vers->
procs[j].p_count);
72 .open = rpc_proc_open,
94 "rpc %u %u %u %u %u\n",
101 for (i = 0; i < prog->
pg_nvers; i++) {
105 for (j = 0; j < vers->
vs_nproc; j++, proc++)
150 op_metrics = &stats[task->
tk_msg.rpc_proc->p_statidx];
159 delta = ktime_sub(req->rq_xtime, task->
tk_start);
162 op_metrics->
om_rtt = ktime_add(op_metrics->
om_rtt, req->rq_rtt);
169 static void _print_name(
struct seq_file *seq,
unsigned int op,
172 if (procs[op].p_name)
173 seq_printf(seq,
"\t%12s: ", procs[op].p_name);
183 struct rpc_xprt *xprt;
196 xprt->ops->print_stats(xprt, seq);
200 for (op = 0; op < maxproc; op++) {
203 seq_printf(seq,
"%lu %lu %lu %Lu %Lu %Lu %Lu %Lu\n",
210 ktime_to_ms(metrics->
om_rtt),
225 dprintk(
"RPC: registering /proc/net/rpc/%s\n", name);
233 return do_register(net, statp->
program->name, statp, &rpc_proc_fops);
250 return do_register(net, statp->
program->pg_name, statp, fops);
268 dprintk(
"RPC: registering /proc/net/rpc\n");
279 dprintk(
"RPC: unregistering /proc/net/rpc\n");