Skip to content

Commit 419ebba

Browse files
aaptelgregkh
authored andcommitted
cifs: ask for more credit on async read/write code paths
[ Upstream commit 88fd98a ] When doing a large read or write workload we only very gradually increase the number of credits which can cause problems with parallelizing large i/o (I/O ramps up more slowly than it should for large read/write workloads) especially with multichannel when the number of credits on the secondary channels starts out low (e.g. less than about 130) or when recovering after server throttled back the number of credit. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b8bfda6 commit 419ebba

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎fs/cifs/smb2pdu.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4032,8 +4032,7 @@ smb2_async_readv(struct cifs_readdata *rdata)
40324032
if (rdata->credits.value > 0) {
40334033
shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(rdata->bytes,
40344034
SMB2_MAX_BUFFER_SIZE));
4035-
shdr->CreditRequest =
4036-
cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 1);
4035+
shdr->CreditRequest = cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 8);
40374036

40384037
rc = adjust_credits(server, &rdata->credits, rdata->bytes);
40394038
if (rc)
@@ -4339,8 +4338,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
43394338
if (wdata->credits.value > 0) {
43404339
shdr->CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->bytes,
43414340
SMB2_MAX_BUFFER_SIZE));
4342-
shdr->CreditRequest =
4343-
cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 1);
4341+
shdr->CreditRequest = cpu_to_le16(le16_to_cpu(shdr->CreditCharge) + 8);
43444342

43454343
rc = adjust_credits(server, &wdata->credits, wdata->bytes);
43464344
if (rc)

0 commit comments

Comments
 (0)