summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mbuf.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-02-17 14:14:15 +0000
committerandre <andre@FreeBSD.org>2006-02-17 14:14:15 +0000
commita6010e7b755af67bf9cc03268250940f6ec51baa (patch)
tree61f82b086382c873a110a1e5319753058263ed1f /sys/kern/kern_mbuf.c
parente7148b146b40c47daafcb3315190caf848d0a7b3 (diff)
downloadFreeBSD-src-a6010e7b755af67bf9cc03268250940f6ec51baa.zip
FreeBSD-src-a6010e7b755af67bf9cc03268250940f6ec51baa.tar.gz
Replace the 4k fixed sized jumbo mbuf clusters with PAGE_SIZE sized
jumbo mbuf clusters. To make the variable size clear they are named MJUMPAGESIZE. Having jumbo clusters with the native PAGE_SIZE is more useful than a fixed 4k size according the device driver writers using this API. The 9k and 16k jumbo mbuf clusters remain unchanged. Requested by: glebius, gallatin Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_mbuf.c')
-rw-r--r--sys/kern/kern_mbuf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 8f5b919..9e53805 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -95,7 +95,7 @@ __FBSDID("$FreeBSD$");
*/
int nmbclusters; /* limits number of mbuf clusters */
-int nmbjumbo4; /* limits number of 4k jumbo clusters */
+int nmbjumbop; /* limits number of page size jumbo clusters */
int nmbjumbo9; /* limits number of 9k jumbo clusters */
int nmbjumbo16; /* limits number of 16k jumbo clusters */
struct mbstat mbstat;
@@ -114,8 +114,8 @@ SYSCTL_DECL(_kern_ipc);
/* XXX: These should be tuneables. Can't change UMA limits on the fly. */
SYSCTL_INT(_kern_ipc, OID_AUTO, nmbclusters, CTLFLAG_RW, &nmbclusters, 0,
"Maximum number of mbuf clusters allowed");
-SYSCTL_INT(_kern_ipc, OID_AUTO, nmbjumbo4, CTLFLAG_RW, &nmbjumbo4, 0,
- "Maximum number of mbuf 4k jumbo clusters allowed");
+SYSCTL_INT(_kern_ipc, OID_AUTO, nmbjumbop, CTLFLAG_RW, &nmbjumbop, 0,
+ "Maximum number of mbuf page size jumbo clusters allowed");
SYSCTL_INT(_kern_ipc, OID_AUTO, nmbjumbo9, CTLFLAG_RW, &nmbjumbo9, 0,
"Maximum number of mbuf 9k jumbo clusters allowed");
SYSCTL_INT(_kern_ipc, OID_AUTO, nmbjumbo16, CTLFLAG_RW, &nmbjumbo16, 0,
@@ -129,7 +129,7 @@ SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat,
uma_zone_t zone_mbuf;
uma_zone_t zone_clust;
uma_zone_t zone_pack;
-uma_zone_t zone_jumbo4;
+uma_zone_t zone_jumbop;
uma_zone_t zone_jumbo9;
uma_zone_t zone_jumbo16;
uma_zone_t zone_ext_refcnt;
@@ -189,7 +189,7 @@ mbuf_init(void *dummy)
mb_dtor_pack, mb_zinit_pack, mb_zfini_pack, zone_mbuf);
/* Make jumbo frame zone too. 4k, 9k and 16k. */
- zone_jumbo4 = uma_zcreate(MBUF_JUMBO4_MEM_NAME, MJUM4BYTES,
+ zone_jumbop = uma_zcreate(MBUF_JUMBOP_MEM_NAME, MJUMPAGESIZE,
mb_ctor_clust, mb_dtor_clust,
#ifdef INVARIANTS
trash_init, trash_fini,
@@ -197,8 +197,8 @@ mbuf_init(void *dummy)
NULL, NULL,
#endif
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
- if (nmbjumbo4 > 0)
- uma_zone_set_max(zone_jumbo4, nmbjumbo4);
+ if (nmbjumbop > 0)
+ uma_zone_set_max(zone_jumbop, nmbjumbop);
zone_jumbo9 = uma_zcreate(MBUF_JUMBO9_MEM_NAME, MJUM9BYTES,
mb_ctor_clust, mb_dtor_clust,
@@ -363,7 +363,7 @@ mb_dtor_pack(void *mem, int size, void *arg)
}
/*
- * The Cluster and Jumbo[9|16] zone constructor.
+ * The Cluster and Jumbo[PAGESIZE|9|16] zone constructor.
*
* Here the 'arg' pointer points to the Mbuf which we
* are configuring cluster storage for. If 'arg' is
@@ -386,9 +386,9 @@ mb_ctor_clust(void *mem, int size, void *arg, int how)
case MCLBYTES:
type = EXT_CLUSTER;
break;
-#if MJUM4BYTES != MCLBYTES
- case MJUM4BYTES:
- type = EXT_JUMBO4;
+#if MJUMPAGESIZE != MCLBYTES
+ case MJUMPAGESIZE:
+ type = EXT_JUMBOP;
break;
#endif
case MJUM9BYTES:
OpenPOWER on IntegriCloud