diff mbox

[v2,5/7] NFSD: grow the session slot table more aggressively

Message ID 1355251459-18034-5-git-send-email-Trond.Myklebust@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Trond Myklebust Dec. 11, 2012, 6:44 p.m. UTC
If the client is bumping against our session limits, then be
more aggressive about growing the slot table. Do not assume that
we need to wait for the client to see previous updates.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 fs/nfsd/nfs4state.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 88d0de9..a380a61 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2073,12 +2073,6 @@  static void nfsd4_sequence_adjust_slot_table(struct nfsd4_session *session,
 	u32 next_highest;
 
 	spin_lock(&tbl->slt_lock);
-	/*
-	 * If this slot hasn't seen our previous values, then don't trust
-	 * that the client has seen them. Don't adjust the slot table yet.
-	 */
-	if (slot->sl_generation != tbl->slt_generation)
-		goto out;
 
 	next_target = tbl->slt_target_highest_slotid;
 
@@ -2088,6 +2082,13 @@  static void nfsd4_sequence_adjust_slot_table(struct nfsd4_session *session,
 		next_target += 1 + (tbl->slt_target_highest_slotid >> 2);
 		next_highest = next_target;
 	} else {
+		/*
+		 * If this slot hasn't seen our previous values, then don't
+		 * trust that the client has seen them. Don't adjust the
+		 * slot table yet.
+		 */
+		if (slot->sl_generation != tbl->slt_generation)
+			goto out;
 		/* No! Try to shrink the window size by 1/2 */
 		next_target >>= 1;
 		if (sa_highest_slotid + 1 > next_target)