aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-02-22 16:34:17 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-02-26 00:40:44 -0500
commit5d00837b90340af9106dcd93af75fd664c8eb87f (patch)
treef537dc84421cf150d66b630e56ea8107078c07a8 /include
parentfda1393938035559b417dd5b26b9cc293a7aee00 (diff)
SUNRPC: Run rpc timeout functions as callbacks instead of in softirqs
An audit of the current RPC timeout functions shows that they don't really ever need to run in the softirq context. As long as the softirq is able to signal that the wakeup is due to a timeout (which it can do by setting task->tk_status to -ETIMEDOUT) then the callback functions can just run as standard task->tk_callback functions (in the rpciod/process context). The only possible border-line case would be xprt_timer() for the case of UDP, when the callback is used to reduce the size of the transport congestion window. In testing, however, the effect of moving that update to a callback would appear to be minor. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/sched.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index 7963ef0ffb89..503a937bdca9 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -56,12 +56,10 @@ struct rpc_task {
56 __u8 tk_cred_retry; 56 __u8 tk_cred_retry;
57 57
58 /* 58 /*
59 * timeout_fn to be executed by timer bottom half
60 * callback to be executed after waking up 59 * callback to be executed after waking up
61 * action next procedure for async tasks 60 * action next procedure for async tasks
62 * tk_ops caller callbacks 61 * tk_ops caller callbacks
63 */ 62 */
64 void (*tk_timeout_fn)(struct rpc_task *);
65 void (*tk_callback)(struct rpc_task *); 63 void (*tk_callback)(struct rpc_task *);
66 void (*tk_action)(struct rpc_task *); 64 void (*tk_action)(struct rpc_task *);
67 const struct rpc_call_ops *tk_ops; 65 const struct rpc_call_ops *tk_ops;
@@ -231,7 +229,7 @@ void rpc_execute(struct rpc_task *);
231void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); 229void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
232void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); 230void rpc_init_wait_queue(struct rpc_wait_queue *, const char *);
233void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, 231void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
234 rpc_action action, rpc_action timer); 232 rpc_action action);
235void rpc_wake_up_queued_task(struct rpc_wait_queue *, 233void rpc_wake_up_queued_task(struct rpc_wait_queue *,
236 struct rpc_task *); 234 struct rpc_task *);
237void rpc_wake_up(struct rpc_wait_queue *); 235void rpc_wake_up(struct rpc_wait_queue *);