Commit 8bd899bc authored by Trond Myklebust's avatar Trond Myklebust

Increase the NFS readahead so that we at least fill the RPC

slot table.
parent 61a70057
...@@ -42,6 +42,17 @@ ...@@ -42,6 +42,17 @@
#define NFSDBG_FACILITY NFSDBG_VFS #define NFSDBG_FACILITY NFSDBG_VFS
#define NFS_PARANOIA 1 #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 *); static struct inode * __nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *);
void nfs_zap_caches(struct inode *); void nfs_zap_caches(struct inode *);
static void nfs_invalidate_inode(struct inode *); static void nfs_invalidate_inode(struct inode *);
...@@ -356,7 +367,7 @@ nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor) ...@@ -356,7 +367,7 @@ nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor)
server->acdirmin = server->acdirmax = 0; server->acdirmin = server->acdirmax = 0;
sb->s_flags |= MS_SYNCHRONOUS; 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; sb->s_maxbytes = fsinfo.maxfilesize;
if (sb->s_maxbytes > MAX_LFS_FILESIZE) if (sb->s_maxbytes > MAX_LFS_FILESIZE)
......
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