aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
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 /fs/nfs
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 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c2
-rw-r--r--fs/nfs/nfs4state.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 54743396b666..bbb0d58ee6ac 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2765,7 +2765,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server)
2765 case -NFS4ERR_STALE_CLIENTID: 2765 case -NFS4ERR_STALE_CLIENTID:
2766 case -NFS4ERR_STALE_STATEID: 2766 case -NFS4ERR_STALE_STATEID:
2767 case -NFS4ERR_EXPIRED: 2767 case -NFS4ERR_EXPIRED:
2768 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL, NULL); 2768 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL);
2769 nfs4_schedule_state_recovery(clp); 2769 nfs4_schedule_state_recovery(clp);
2770 if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0) 2770 if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0)
2771 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); 2771 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task);
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index b962397004c1..a2ef02824aa8 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -731,7 +731,7 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task)
731 list_add_tail(&seqid->list, &sequence->list); 731 list_add_tail(&seqid->list, &sequence->list);
732 if (list_first_entry(&sequence->list, struct nfs_seqid, list) == seqid) 732 if (list_first_entry(&sequence->list, struct nfs_seqid, list) == seqid)
733 goto unlock; 733 goto unlock;
734 rpc_sleep_on(&sequence->wait, task, NULL, NULL); 734 rpc_sleep_on(&sequence->wait, task, NULL);
735 status = -EAGAIN; 735 status = -EAGAIN;
736unlock: 736unlock:
737 spin_unlock(&sequence->lock); 737 spin_unlock(&sequence->lock);