Skip to content

Commit b1843d2

Browse files
committed
9p: set readahead and io size according to maxsize
having a readahead of 128k with a msize of 128k (with overhead) lead to reading 124+4k everytime, making two roundtrips needlessly. tune readahead according to msize when cache is enabled for better performance Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Dominique Martinet <[email protected]>
1 parent 05f975c commit b1843d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/9p/vfs_super.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
7979
if (!v9ses->cache) {
8080
sb->s_bdi->ra_pages = 0;
8181
sb->s_bdi->io_pages = 0;
82+
} else {
83+
sb->s_bdi->ra_pages = v9ses->maxdata >> PAGE_SHIFT;
84+
sb->s_bdi->io_pages = v9ses->maxdata >> PAGE_SHIFT;
8285
}
8386

8487
sb->s_flags |= SB_ACTIVE | SB_DIRSYNC;

0 commit comments

Comments
 (0)