All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE depend on PAGE_SIZE
@ 2003-11-28 12:43 Greg Banks
  2003-11-30 22:26 ` Neil Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Banks @ 2003-11-28 12:43 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux NFS Mailing List

G'day,

SGI bug #905314

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.

The patch has been running for some hours now, reading and writing NFSv3
over UDP on gigabit ethernet between two Altix boxes (16K page sizes) with
4G RAM each.  I have verified with ethereal that reads and writes proceed
in 32K blocks, and performance tests show good throughput for streaming
reads and writes (although 2.6.0-test8 still does better).


--- /usr/tmp/TmpDir.28396-0/linux/linux/include/linux/nfsd/const.h_1.5	Fri Nov 28
23:07:47 2003
+++ linux/include/linux/nfsd/const.h	Fri Nov 28 23:07:36 2003
@@ -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,24 @@
 #define NFSSVC_MAXVERS		3
 
 /*
- * Maximum blocksize supported by daemon currently at 8K
+ * Maximum blocksize supported by daemon.  The value is
+ * constrained by 1) has to fit in a UDP datagram less some
+ * headers 2) must be a multiple of page size 3) will have to
+ * be allocated plus some headers as a physically contiguous
+ * buffer for each nfsd.   For best performance we usually want
+ * the largest value consistent with those constraints.   The
+ * fuzziest condition is 3;  here we choose to limit the gfp
+ * allocation order <= 2 and cross our fingers.  Note we also
+ * choose powers of 2 like the client code even though there's
+ * no good reason to do so.
  */
+#if PAGE_SIZE > (8*1024)
+#define NFSSVC_MAXBLKSIZE	(32*1024)
+#elif PAGE_SIZE == (8*1024)
+#define NFSSVC_MAXBLKSIZE	(16*1024)
+#else /* 4K pages */
 #define NFSSVC_MAXBLKSIZE	(8*1024)
+#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: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-12-03 10:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28 12:43 [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE depend on PAGE_SIZE Greg Banks
2003-11-30 22:26 ` Neil Brown
2003-11-30 23:26   ` Greg Banks
2003-12-01 11:38     ` Bogdan Costescu
2003-12-02  0:26       ` Re: [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE dependon PAGE_SIZE Greg Banks
2003-12-02 11:26       ` Mailbox corruption on The NFS server Shivaji Navale
2003-12-02 18:51         ` Juri Haberland
2003-12-02 19:35           ` Trond Myklebust
2003-12-03 10:56             ` Shivaji Navale

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.