From f5fb626ca74bfed8adb6fd76c247a60a9693e15c Mon Sep 17 00:00:00 2001 From: Jim Somerville 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 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