svn commit: r199723 - head/sys/sys

Marcel Moolenaar marcel at FreeBSD.org
Mon Nov 23 23:23:06 UTC 2009


Author: marcel
Date: Mon Nov 23 23:23:05 2009
New Revision: 199723
URL: http://svn.freebsd.org/changeset/base/199723

Log:
  Don't make MJUMPAGESIZE equal to PAGE_SIZE unconditionally.
  When PAGE_SIZE is 16K, MJUMPAGESIZE equals MJUM16BYTES and
  causes build breakages.
  For PAGE_SIZE < 2K, define MJUMPAGESIZE as MCLBYTES.
  For PAGE_SIZE > 8K, define MJUMPAGESIZE as 8K.
  Everywhere inbetween, define MJUMPAGESIZE as PAGE_SIZE.
  
  Thus MCLBYTES <= MJUMPAGESIZE <= 8KB.

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Mon Nov 23 22:28:15 2009	(r199722)
+++ head/sys/sys/param.h	Mon Nov 23 23:23:05 2009	(r199723)
@@ -144,7 +144,14 @@
 
 #define MCLBYTES	(1 << MCLSHIFT)	/* size of an mbuf cluster */
 
-#define	MJUMPAGESIZE	PAGE_SIZE	/* jumbo cluster 4k */
+#if PAGE_SIZE < 2048
+#define	MJUMPAGESIZE	MCLBYTES
+#elif PAGE_SIZE <= 8192
+#define	MJUMPAGESIZE	PAGE_SIZE
+#else
+#define	MJUMPAGESIZE	(8 * 1024)
+#endif
+
 #define	MJUM9BYTES	(9 * 1024)	/* jumbo cluster 9k */
 #define	MJUM16BYTES	(16 * 1024)	/* jumbo cluster 16k */
 


More information about the svn-src-all mailing list