Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 23:23:05 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199723 - head/sys/sys
Message-ID:  <200911232323.nANNN5gl084110@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911232323.nANNN5gl084110>