diff options
author | Chuck Lever <cel@netapp.com> | 2006-03-20 13:44:15 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:15 -0500 |
commit | e19b63dafdf7d615b0d36b90990a07e7792b9d3a (patch) | |
tree | 45474992fd5d6a1f4c4c49068ec6383429618515 /net | |
parent | 67ec9f46b889bfb1ab0a4e307d53929d5f0692bf (diff) | |
download | op-kernel-dev-e19b63dafdf7d615b0d36b90990a07e7792b9d3a.zip op-kernel-dev-e19b63dafdf7d615b0d36b90990a07e7792b9d3a.tar.gz |
SUNRPC: track length of RPC wait queues
RPC wait queue length will eventually be exported to userland via the RPC
iostats interface.
Test plan:
Compile kernel with CONFIG_NFS enabled.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/sched.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 1b74420..aa0449d 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -181,6 +181,7 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task * else list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]); task->u.tk_wait.rpc_waitq = queue; + queue->qlen++; rpc_set_queued(task); dprintk("RPC: %4d added to queue %p \"%s\"\n", @@ -215,6 +216,7 @@ static void __rpc_remove_wait_queue(struct rpc_task *task) __rpc_remove_wait_queue_priority(task); else list_del(&task->u.tk_wait.list); + queue->qlen--; dprintk("RPC: %4d removed from queue %p \"%s\"\n", task->tk_pid, queue, rpc_qname(queue)); } |