aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-11-30 18:09:02 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:49 -0500
commit40859d7ee64ed6bfad8a4e93f9bb5c1074afadff (patch)
treeed4069423c3d6551035d5b6116f50452cdac4103 /fs/nfs/read.c
parent325cfed9ae901320e9234b18c21434b783dbe342 (diff)
NFS: support large reads and writes on the wire
Most NFS server implementations allow up to 64KB reads and writes on the wire. The Solaris NFS server allows up to a megabyte, for instance. Now the Linux NFS client supports transfer sizes up to 1MB, too. This will help reduce protocol and context switch overhead on read/write intensive NFS workloads, and support larger atomic read and write operations on servers that support them. Test-plan: Connectathon and iozone on mount point with wsize=rsize>32768 over TCP. Tests with NFS over UDP to verify the maximum RPC payload size cap. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 21486242c3d3..05eb43fadf8e 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -83,7 +83,7 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode,
83 int result; 83 int result;
84 struct nfs_read_data *rdata; 84 struct nfs_read_data *rdata;
85 85
86 rdata = nfs_readdata_alloc(); 86 rdata = nfs_readdata_alloc(1);
87 if (!rdata) 87 if (!rdata)
88 return -ENOMEM; 88 return -ENOMEM;
89 89
@@ -283,7 +283,7 @@ static int nfs_pagein_multi(struct list_head *head, struct inode *inode)
283 283
284 nbytes = req->wb_bytes; 284 nbytes = req->wb_bytes;
285 for(;;) { 285 for(;;) {
286 data = nfs_readdata_alloc(); 286 data = nfs_readdata_alloc(1);
287 if (!data) 287 if (!data)
288 goto out_bad; 288 goto out_bad;
289 INIT_LIST_HEAD(&data->pages); 289 INIT_LIST_HEAD(&data->pages);
@@ -339,7 +339,7 @@ static int nfs_pagein_one(struct list_head *head, struct inode *inode)
339 if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) 339 if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE)
340 return nfs_pagein_multi(head, inode); 340 return nfs_pagein_multi(head, inode);
341 341
342 data = nfs_readdata_alloc(); 342 data = nfs_readdata_alloc(NFS_SERVER(inode)->rpages);
343 if (!data) 343 if (!data)
344 goto out_bad; 344 goto out_bad;
345 345