Commit 2b6c26a0 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: set ra_pages in backing_dev_info

Commit 522440ed made cifs set backing_dev_info on the mapping attached
to new inodes. This change caused a fairly significant read performance
regression, as cifs started doing page-sized reads exclusively.

By virtue of the fact that they're allocated as part of cifs_sb_info by
kzalloc, the ra_pages on cifs BDIs get set to 0, which prevents any
readahead. This forces the normal read codepaths to use readpage instead
of readpages causing a four-fold increase in the number of read calls
with the default rsize.

Fix it by setting ra_pages in the BDI to the same value as that in the
default_backing_dev_info.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=31662

Cc: stable@kernel.org
Reported-and-Tested-by: default avatarTill <till2.schaefer@uni-dortmund.de>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 8679b0db
...@@ -130,6 +130,7 @@ cifs_read_super(struct super_block *sb, void *data, ...@@ -130,6 +130,7 @@ cifs_read_super(struct super_block *sb, void *data,
kfree(cifs_sb); kfree(cifs_sb);
return rc; return rc;
} }
cifs_sb->bdi.ra_pages = default_backing_dev_info.ra_pages;
#ifdef CONFIG_CIFS_DFS_UPCALL #ifdef CONFIG_CIFS_DFS_UPCALL
/* copy mount params to sb for use in submounts */ /* copy mount params to sb for use in submounts */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment