diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-29 17:27:47 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-05 18:30:52 -0500 |
commit | b75ad4cda5a6cd3431b1c65c2739c5ebd2c4b9da (patch) | |
tree | 6ba6dd80fc8e118067ca70bd67345864835fe98a /fs/nfs/nfs4state.c | |
parent | 62ae082d883d167cdaa7895cf2972d85e178228a (diff) |
NFSv4.1: Ensure smooth handover of slots from one task to the next waiting
Currently, we see a lot of bouncing for the value of highest_used_slotid
due to the fact that slots are getting freed, instead of getting instantly
transmitted to the next waiting task.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 7d73df5a05d1..78e90a80fc3a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -255,17 +255,13 @@ static void nfs4_end_drain_session(struct nfs_client *clp) | |||
255 | { | 255 | { |
256 | struct nfs4_session *ses = clp->cl_session; | 256 | struct nfs4_session *ses = clp->cl_session; |
257 | struct nfs4_slot_table *tbl; | 257 | struct nfs4_slot_table *tbl; |
258 | unsigned int i; | ||
259 | 258 | ||
260 | if (ses == NULL) | 259 | if (ses == NULL) |
261 | return; | 260 | return; |
262 | tbl = &ses->fc_slot_table; | 261 | tbl = &ses->fc_slot_table; |
263 | if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { | 262 | if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { |
264 | spin_lock(&tbl->slot_tbl_lock); | 263 | spin_lock(&tbl->slot_tbl_lock); |
265 | for (i = 0; i <= tbl->max_slotid; i++) { | 264 | nfs41_wake_slot_table(tbl); |
266 | if (rpc_wake_up_next(&tbl->slot_tbl_waitq) == NULL) | ||
267 | break; | ||
268 | } | ||
269 | spin_unlock(&tbl->slot_tbl_lock); | 265 | spin_unlock(&tbl->slot_tbl_lock); |
270 | } | 266 | } |
271 | } | 267 | } |