diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-18 20:18:52 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-29 07:21:59 (GMT) |
commit | 36df9aae3158ce8fc4ede241169dc94ac910d884 (patch) | |
tree | 5f6caa22ce9414850fd34eefb54150b120a8f4e7 /include/linux/sunrpc | |
parent | f6a1cc89309f0ae847a9b6fe418d1c4215e5bc55 (diff) | |
download | linux-fsl-qoriq-36df9aae3158ce8fc4ede241169dc94ac910d884.tar.xz |
SUNRPC: Add a timer function to wait queues.
This is designed to replace the timeout timer in the individual rpc_tasks.
By putting the timer function in the wait queue, we will eventually be able
to reduce the total number of timers in use by the RPC subsystem.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/sched.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index d39729e..7751d3a 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -33,6 +33,8 @@ struct rpc_wait_queue; struct rpc_wait { struct list_head list; /* wait queue links */ struct list_head links; /* Links to related tasks */ + struct list_head timer_list; /* Timer list */ + unsigned long expires; }; /* @@ -191,6 +193,12 @@ struct rpc_task_setup { #define RPC_PRIORITY_HIGH (1) #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_HIGH - RPC_PRIORITY_LOW) +struct rpc_timer { + struct timer_list timer; + struct list_head list; + unsigned long expires; +}; + /* * RPC synchronization objects */ @@ -203,6 +211,7 @@ struct rpc_wait_queue { unsigned char count; /* # task groups remaining serviced so far */ unsigned char nr; /* # tasks remaining for cookie */ unsigned short qlen; /* total # tasks waiting in queue */ + struct rpc_timer timer_list; #ifdef RPC_DEBUG const char * name; #endif |