Skip to content

Commit ba8c2b7

Browse files
committed
smb3: improve parallel reads of large files
rasize (ra_pages) should be set higher than read size by default to allow parallel reads when reading large files in order to improve performance (otherwise there is much dead time on the network when doing readahead of large files). Default rasize to twice readsize. Signed-off-by: Steve French <[email protected]>
1 parent cbd4cba commit ba8c2b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/cifsfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ cifs_read_super(struct super_block *sb)
246246
if (cifs_sb->ctx->rasize)
247247
sb->s_bdi->ra_pages = cifs_sb->ctx->rasize / PAGE_SIZE;
248248
else
249-
sb->s_bdi->ra_pages = cifs_sb->ctx->rsize / PAGE_SIZE;
249+
sb->s_bdi->ra_pages = 2 * (cifs_sb->ctx->rsize / PAGE_SIZE);
250250

251251
sb->s_blocksize = CIFS_MAX_MSGSIZE;
252252
sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */

0 commit comments

Comments
 (0)