From 8bd899bc86d670aa94d7a4f02862285d5fbb0697 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 7 Oct 2003 07:37:34 -0400 Subject: [PATCH] Increase the NFS readahead so that we at least fill the RPC slot table. --- fs/nfs/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 4ecb69586babf..4ed5e21d1f7d2 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -42,6 +42,17 @@ #define NFSDBG_FACILITY NFSDBG_VFS #define NFS_PARANOIA 1 +/* Maximum number of readahead requests + * FIXME: this should really be a sysctl so that users may tune it to suit + * their needs. People that do NFS over a slow network, might for + * instance want to reduce it to something closer to 1 for improved + * interactive response. + * + * For the moment, though, we instead set it to RPC_MAXREQS, which + * is the maximum number of simultaneous RPC requests on the wire. + */ +#define NFS_MAX_READAHEAD RPC_MAXREQS + static struct inode * __nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *); void nfs_zap_caches(struct inode *); static void nfs_invalidate_inode(struct inode *); @@ -356,7 +367,7 @@ nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor) server->acdirmin = server->acdirmax = 0; sb->s_flags |= MS_SYNCHRONOUS; } - server->backing_dev_info.ra_pages = server->rpages << 2; + server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; sb->s_maxbytes = fsinfo.maxfilesize; if (sb->s_maxbytes > MAX_LFS_FILESIZE) -- 2.53.0