From: Greg Banks Subject: [PATCH 2.4] (retry) increase NFSSVC_MAXBLKSIZE on large page machines Date: Mon, 26 Jul 2004 18:14:39 +1000 Sender: nfs-admin@lists.sourceforge.net Message-ID: <20040726081439.GE17056@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux NFS Mailing List Return-path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12] helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1Bp1dk-0002io-FX for nfs@lists.sourceforge.net; Mon, 26 Jul 2004 02:19:24 -0700 Received: from [192.48.171.20] (helo=omx3.sgi.com) by sc8-sf-mx2.sourceforge.net with esmtp (Exim 4.34) id 1Bp1dk-0000hi-4W for nfs@lists.sourceforge.net; Mon, 26 Jul 2004 02:19:24 -0700 To: Neil Brown Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: G'day, I've been out of the loop for a few weeks now so I'm getting back in by sending and resending a bunch of patches. This one (for 2.4 only) was sent twice but has not yet appeared in Marcello's BK. http://marc.theaimsgroup.com/?l=linux-nfs&m=107002386729570&w=2 http://marc.theaimsgroup.com/?l=linux-kernel&m=108391490102531&w=2 This patch makes NFSSVC_MAXBLKSIZE depend on PAGE_SIZE so that machines with large page sizes can take advantage of that feature to serve NFS with larger blocksizes, increasing performance and avoiding a fallback to synchronous traffic between machines with page sizes greater than 8K. Also, documents the actual constraints on NFSSVC_MAXBLKSIZE. --- /usr/tmp/TmpDir.16250-0/linux/linux/include/linux/nfsd/const.h_1.5 Fri May 7 17:20:22 2004 +++ /usr/tmp/TmpDir.16250-0/linux/linux/include/linux/nfsd/const.h Fri May 7 17:20:22 2004 @@ -12,6 +12,7 @@ #include #include #include +#include /* * Maximum protocol version supported by knfsd @@ -19,9 +20,16 @@ #define NFSSVC_MAXVERS 3 /* - * Maximum blocksize supported by daemon currently at 8K + * Maximum blocksize supported by daemon. We want the largest + * value which 1) fits in a UDP datagram less some headers + * 2) is a multiple of page size 3) can be successfully kmalloc()ed + * by each nfsd. */ -#define NFSSVC_MAXBLKSIZE (8*1024) +#if PAGE_SIZE > (16*1024) +#define NFSSVC_MAXBLKSIZE (32*1024) +#else +#define NFSSVC_MAXBLKSIZE (2*PAGE_SIZE) +#endif #ifdef __KERNEL__ Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs