PERFORCE change 36226 for review
Sam Leffler
sam at FreeBSD.org
Fri Aug 15 15:37:51 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=36226
Change 36226 by sam at sam_ebb on 2003/08/15 15:37:28
slight mods to eliminate multiple references to constants like
MSIZE; this simplifies switching the mbuf object size to a page
for debugging
Affected files ...
.. //depot/projects/netperf/sys/kern/subr_mbuf.c#4 edit
Differences ...
==== //depot/projects/netperf/sys/kern/subr_mbuf.c#4 (text+ko) ====
@@ -391,8 +391,12 @@
&(mb_list_mbuf.ml_maptop), mb_map_size);
mb_list_mbuf.ml_map->system_map = 1;
mb_list_mbuf.ml_mapfull = 0;
+#if 1
mb_list_mbuf.ml_objsize = MSIZE;
- mb_list_mbuf.ml_objbucks = MBUF_BUCK_SZ / MSIZE;
+#else
+ mb_list_mbuf.ml_objsize = PAGE_SIZE;
+#endif
+ mb_list_mbuf.ml_objbucks = MBUF_BUCK_SZ / mb_list_mbuf.ml_objsize;
mb_list_mbuf.ml_wmhigh = &mbuf_hiwm;
mb_list_mbuf.ml_wmlow = &mbuf_lowm;
@@ -408,7 +412,7 @@
mb_list_clust.ml_map->system_map = 1;
mb_list_clust.ml_mapfull = 0;
mb_list_clust.ml_objsize = MCLBYTES;
- mb_list_clust.ml_objbucks = CLUST_BUCK_SZ / MCLBYTES;
+ mb_list_clust.ml_objbucks = CLUST_BUCK_SZ / mb_list_clust.ml_objsize;
mb_list_clust.ml_wmhigh = &clust_hiwm;
mb_list_clust.ml_wmlow = &clust_lowm;
@@ -465,14 +469,14 @@
/*
* Initialize general mbuf statistics.
*/
- mbstat.m_msize = MSIZE;
- mbstat.m_mclbytes = MCLBYTES;
+ mbstat.m_msize = mb_list_mbuf.ml_objsize;
+ mbstat.m_mclbytes = mb_list_clust.ml_objsize;
mbstat.m_minclsize = MINCLSIZE;
mbstat.m_mlen = MLEN;
mbstat.m_mhlen = MHLEN;
mbstat.m_numtypes = MT_NTYPES;
- mbstat.m_mbperbuck = MBUF_BUCK_SZ / MSIZE;
- mbstat.m_clperbuck = CLUST_BUCK_SZ / MCLBYTES;
+ mbstat.m_mbperbuck = mb_list_mbuf.ml_objbucks;
+ mbstat.m_clperbuck = mb_list_clust.ml_objbucks;
/*
* Allocate and initialize PCPU containers.
More information about the p4-projects
mailing list