summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2002-07-24 15:11:23 +0000
committerbmilekic <bmilekic@FreeBSD.org>2002-07-24 15:11:23 +0000
commitffebbf61bcbfe9454ef61afb4985012a73ad52e0 (patch)
treed95cc09f997768fe9fb30935549a17ce07c84879 /sys/kern/uipc_mbuf.c
parent2eda4f26f636e106d6bb1c4381d8d45e76755fa7 (diff)
downloadFreeBSD-src-ffebbf61bcbfe9454ef61afb4985012a73ad52e0.zip
FreeBSD-src-ffebbf61bcbfe9454ef61afb4985012a73ad52e0.tar.gz
Move m_freem() from uipc_mbuf.c to subr_mbuf.c so it can take advantage
of the inlines, like its cousin, m_free(). Also, make a small (first step?) optimisation of m_free() to use the MBP_PERSIST{,ENT} interface to hold the lock across frees when possible. The thing is that right now, we can only do this easily for at most across one mbuf + one cluster free, as the comment mentions (it also explains why). Anyway, some basic tests revealed a 5-10% overall improvement. Some of the results can be found here: http://people.freebsd.org/~bmilekic/code/measure.txt
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index ea8f16d..2c74a4c 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -62,14 +62,6 @@ SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, "");
SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW,
&max_datalen, 0, "");
-void
-m_freem(struct mbuf *m)
-{
- while (m) {
- m = m_free(m);
- }
-}
-
/*
* Lesser-used path for M_PREPEND:
* allocate new mbuf to prepend to chain,
OpenPOWER on IntegriCloud