aboutsummaryrefslogtreecommitdiffstats
path: root/patches/boot/nfs-Allow-default-io-size-to-be-configured.patch
blob: c598289d4a15e7ecf3165dafe2413ffa24cf7f8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From f5fb626ca74bfed8adb6fd76c247a60a9693e15c Mon Sep 17 00:00:00 2001
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Thu, 8 Apr 2010 23:44:22 -0700
Subject: [PATCH] nfs: Allow default io size to be configured.

Some boards need a smaller size here for
performance reasons, so let's make the value
configurable for those boards.

Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>

diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index f31fd0dd92c6..4146a61fa3a2 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -39,6 +39,19 @@ config NFS_V2
 
 	  If unsure, say Y.
 
+config NFS_DEF_FILE_IO_SIZE
+	int "Default size for NFS I/O read and write at runtime"
+	depends on NFS_FS
+	default "4096"
+	help
+	  To change the default rsize and wsize supported by the NFS client,
+	  adjust NFS_DEF_FILE_IO_SIZE.  64KB is a typical maximum, but some
+	  servers can support a megabyte or more.  The default is left at 4096
+	  bytes, which is reasonable for NFS over UDP, however, for some
+	  systems, setting a smaller value like 1024 can work around
+	  limitations in the driver or hardware and result in overall
+	  improved performance.
+
 config NFS_V3
 	tristate "NFS client support for NFS version 3"
 	depends on NFS_FS
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 7cc0deee5bde..c80a4853f4d9 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -11,7 +11,7 @@
  * reasonable for NFS over UDP.
  */
 #define NFS_MAX_FILE_IO_SIZE	(1048576U)
-#define NFS_DEF_FILE_IO_SIZE	(4096U)
+#define NFS_DEF_FILE_IO_SIZE	CONFIG_NFS_DEF_FILE_IO_SIZE
 #define NFS_MIN_FILE_IO_SIZE	(1024U)
 
 struct nfs4_string {
-- 
2.10.1