diff options
author | andre <andre@FreeBSD.org> | 2006-02-17 14:14:15 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-02-17 14:14:15 +0000 |
commit | a6010e7b755af67bf9cc03268250940f6ec51baa (patch) | |
tree | 61f82b086382c873a110a1e5319753058263ed1f /sys/sys | |
parent | e7148b146b40c47daafcb3315190caf848d0a7b3 (diff) | |
download | FreeBSD-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/sys')
-rw-r--r-- | sys/sys/mbuf.h | 22 | ||||
-rw-r--r-- | sys/sys/param.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index d762a29..4fb1ae8 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -185,7 +185,7 @@ struct mbuf { */ #define EXT_CLUSTER 1 /* mbuf cluster */ #define EXT_SFBUF 2 /* sendfile(2)'s sf_bufs */ -#define EXT_JUMBO4 3 /* jumbo cluster 4096 bytes */ +#define EXT_JUMBOP 3 /* jumbo cluster 4096 bytes */ #define EXT_JUMBO9 4 /* jumbo cluster 9216 bytes */ #define EXT_JUMBO16 5 /* jumbo cluster 16184 bytes */ #define EXT_PACKET 6 /* mbuf+cluster from packet zone */ @@ -306,7 +306,7 @@ struct mbstat { #define MBUF_MEM_NAME "mbuf" #define MBUF_CLUSTER_MEM_NAME "mbuf_cluster" #define MBUF_PACKET_MEM_NAME "mbuf_packet" -#define MBUF_JUMBO4_MEM_NAME "mbuf_jumbo_4k" +#define MBUF_JUMBOP_MEM_NAME "mbuf_jumbo_pagesize" #define MBUF_JUMBO9_MEM_NAME "mbuf_jumbo_9k" #define MBUF_JUMBO16_MEM_NAME "mbuf_jumbo_16k" #define MBUF_TAG_MEM_NAME "mbuf_tag" @@ -333,7 +333,7 @@ struct mbstat { extern uma_zone_t zone_mbuf; extern uma_zone_t zone_clust; extern uma_zone_t zone_pack; -extern uma_zone_t zone_jumbo4; +extern uma_zone_t zone_jumbop; extern uma_zone_t zone_jumbo9; extern uma_zone_t zone_jumbo16; extern uma_zone_t zone_ext_refcnt; @@ -401,7 +401,7 @@ m_getcl(int how, short type, int flags) /* * m_getjcl() returns an mbuf with a cluster of the specified size attached. - * For size it takes MCLBYTES, MJUM4BYTES, MJUM9BYTES, MJUM16BYTES. + * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. */ static __inline /* XXX: This is rather large, should be real function maybe. */ struct mbuf * @@ -422,9 +422,9 @@ m_getjcl(int how, short type, int flags, int size) case MCLBYTES: zone = zone_clust; break; -#if MJUM4BYTES != MCLBYTES - case MJUM4BYTES: - zone = zone_jumbo4; +#if MJUMPAGESIZE != MCLBYTES + case MJUMPAGESIZE: + zone = zone_jumbop; break; #endif case MJUM9BYTES: @@ -473,7 +473,7 @@ m_clget(struct mbuf *m, int how) * is the pointer to the cluster of the requested size. If an mbuf was * specified, it gets the cluster attached to it and the return value * can be safely ignored. - * For size it takes MCLBYTES, MJUM4BYTES, MJUM9BYTES, MJUM16BYTES. + * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. */ static __inline void * @@ -490,9 +490,9 @@ m_cljget(struct mbuf *m, int how, int size) case MCLBYTES: zone = zone_clust; break; -#if MJUM4BYTES != MCLBYTES - case MJUM4BYTES: - zone = zone_jumbo4; +#if MJUMPAGESIZE != MCLBYTES + case MJUMPAGESIZE: + zone = zone_jumbop; break; #endif case MJUM9BYTES: diff --git a/sys/sys/param.h b/sys/sys/param.h index 94696cc..4c6a6ca 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -147,7 +147,7 @@ #define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */ -#define MJUM4BYTES (4 * 1024) /* jumbo cluster 4k */ +#define MJUMPAGESIZE PAGE_SIZE /* jumbo cluster 4k */ #define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */ #define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */ |