diff options
author | alfred <alfred@FreeBSD.org> | 2000-07-15 06:02:48 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2000-07-15 06:02:48 +0000 |
commit | 19218742c79bc568b51151a03650c200143ac212 (patch) | |
tree | 0f26af95c061690968862fc7416db5b0dba46a26 /sys/kern | |
parent | adb3b8c68a633556cffb8f4e0b29aab63510c3d4 (diff) | |
download | FreeBSD-src-19218742c79bc568b51151a03650c200143ac212.zip FreeBSD-src-19218742c79bc568b51151a03650c200143ac212.tar.gz |
Make mbstat.m_mtypes seperate and viewable via sysctl, also
expand the size from short to ulong
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
PR: kern/19809
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 763e0b4..1771137 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -58,6 +58,7 @@ SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbinit, NULL) struct mbuf *mbutl; char *mclrefcnt; struct mbstat mbstat; +u_long mbtypes[MT_NTYPES]; struct mbuf *mmbfree; union mcluster *mclfree; int max_linkhdr; @@ -80,6 +81,8 @@ SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW, SYSCTL_INT(_kern_ipc, OID_AUTO, mbuf_wait, CTLFLAG_RW, &mbuf_wait, 0, ""); SYSCTL_STRUCT(_kern_ipc, KIPC_MBSTAT, mbstat, CTLFLAG_RW, &mbstat, mbstat, ""); +SYSCTL_OPAQUE(_kern_ipc, OID_AUTO, mbtypes, CTLFLAG_RD, mbtypes, + sizeof(mbtypes), "LU", ""); SYSCTL_INT(_kern_ipc, KIPC_NMBCLUSTERS, nmbclusters, CTLFLAG_RD, &nmbclusters, 0, "Maximum number of mbuf clusters available"); SYSCTL_INT(_kern_ipc, OID_AUTO, nmbufs, CTLFLAG_RD, &nmbufs, 0, @@ -184,6 +187,7 @@ m_mballoc(nmb, how) p += MSIZE; } mbstat.m_mbufs += nmb; + mbtypes[MT_FREE] += nmb; return (1); } |