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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 fs/nfsd/nfs4state.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

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)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux