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 #include +_Static_assert(MJUMPAGESIZE > MCLBYTES, + "Cluster must be smaller than a 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)