Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115928406
D36320.id109772.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36320.id109772.diff
View Options
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -63,6 +63,9 @@
#include <vm/uma.h>
#include <vm/uma_dbg.h>
+_Static_assert(MJUMPAGESIZE > MCLBYTES,
+ "Cluster must be smaller than a jumbo page");
+
/*
* In FreeBSD, Mbufs and Mbuf Clusters are allocated from UMA
* Zones.
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -894,11 +894,9 @@
case MCLBYTES:
type = EXT_CLUSTER;
break;
-#if MJUMPAGESIZE != MCLBYTES
case MJUMPAGESIZE:
type = EXT_JUMBOP;
break;
-#endif
case MJUM9BYTES:
type = EXT_JUMBO9;
break;
@@ -944,11 +942,9 @@
case MCLBYTES:
zone = zone_clust;
break;
-#if MJUMPAGESIZE != MCLBYTES
case MJUMPAGESIZE:
zone = zone_jumbop;
break;
-#endif
case MJUM9BYTES:
zone = zone_jumbo9;
break;
@@ -1068,11 +1064,9 @@
case EXT_CLUSTER:
size = MCLBYTES;
break;
-#if MJUMPAGESIZE != MCLBYTES
case EXT_JUMBOP:
size = MJUMPAGESIZE;
break;
-#endif
case EXT_JUMBO9:
size = MJUM9BYTES;
break;
diff --git a/sys/sys/param.h b/sys/sys/param.h
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -200,9 +200,7 @@
#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
-#if PAGE_SIZE < 2048
-#define MJUMPAGESIZE MCLBYTES
-#elif PAGE_SIZE <= 8192
+#if PAGE_SIZE <= 8192
#define MJUMPAGESIZE PAGE_SIZE
#else
#define MJUMPAGESIZE (8 * 1024)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 1:04 PM (8 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17881774
Default Alt Text
D36320.id109772.diff (1 KB)
Attached To
Mode
D36320: mbuf: Don't support PAGE_SIZE < 4K
Attached
Detach File
Event Timeline
Log In to Comment