From 0184d5b0863f8f9585b4dabb98e7939af9eec84b Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Thu, 8 Apr 2010 23:44:22 -0700 Subject: [PATCH 2/3] 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 --- fs/nfs/Kconfig | 13 +++++++++++++ include/linux/nfs_xdr.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig index 2a0e6c5..4996f4d 100644 --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig @@ -29,6 +29,19 @@ config NFS_FS If unsure, say N. +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 bool "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 7ba3551..3a6576d 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) /* Forward declaration for NFS v3 */ -- 1.7.9.7