Skip to contentSkip to conversation

(retry) increase NFSSVC_MAXBLKSIZE on large page machines

PATCH In review Greg Banks 3 participants 3 messages Jul 26, 2004 – Jul 27, 2004

Subsystems (3)
lore
Share & tools
lore

Greg Banks

author
#0 lore raw

PATCH 1/1 (retry) increase NFSSVC_MAXBLKSIZE on large page machines

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 renamed from usr/tmp/TmpDir.16250-0/linux/linux/include/linux/nfsd/const.h_1.5 +10 -2
@@ -12,6 +12,7 @@
 #include <linux/nfs.h>
 #include <linux/nfs2.h>
 #include <linux/nfs3.h>
+#include <asm/page.h>
 
 /*
  * 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.

Signature · 12 lines
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 6 lines · Greg Banks

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.

Quoted 10 lines

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.

I've had people ask about this as well.... It would be good if this made in (imho)....

SteveD.

-------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw
In reply to Greg Banks
Quoted 7 lines · On Monday July 26, [email protected] wrote:

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.

Sorry 'bout that. I keep remembering it when I'm not in a position to do anything about it...
I've just sent it and the TCP-not-experimental patch to Marcelo.

thanks,

NeilBrown

Quoted 40 lines

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 renamed from usr/tmp/TmpDir.16250-0/linux/linux/include/linux/nfsd/const.h_1.5 +10 -2
@@ -12,6 +12,7 @@
 #include <linux/nfs.h>
 #include <linux/nfs2.h>
 #include <linux/nfs3.h>
+#include <asm/page.h>
 
 /*
  * 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__
 
Quoted 4 lines

Greg.

Signature · 2 lines
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs