Deleted Added
full compact
uipc_mbuf.c (48391) uipc_mbuf.c (48579)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
34 * $Id: uipc_mbuf.c,v 1.39 1999/04/12 10:07:15 des Exp $
34 * $Id: uipc_mbuf.c,v 1.40 1999/07/01 13:21:39 peter Exp $
35 */
36
35 */
36
37#include "opt_param.h"
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/malloc.h>
40#include <sys/mbuf.h>
41#include <sys/kernel.h>
42#include <sys/sysctl.h>
43#include <sys/domain.h>
44#include <sys/protosw.h>

--- 9 unchanged lines hidden (view full) ---

54char *mclrefcnt;
55struct mbstat mbstat;
56struct mbuf *mmbfree;
57union mcluster *mclfree;
58int max_linkhdr;
59int max_protohdr;
60int max_hdr;
61int max_datalen;
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/kernel.h>
43#include <sys/sysctl.h>
44#include <sys/domain.h>
45#include <sys/protosw.h>

--- 9 unchanged lines hidden (view full) ---

55char *mclrefcnt;
56struct mbstat mbstat;
57struct mbuf *mmbfree;
58union mcluster *mclfree;
59int max_linkhdr;
60int max_protohdr;
61int max_hdr;
62int max_datalen;
63int nmbclusters;
64int nmbufs;
62
63SYSCTL_DECL(_kern_ipc);
64SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RW,
65 &max_linkhdr, 0, "");
66SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RW,
67 &max_protohdr, 0, "");
68SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, "");
69SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW,
70 &max_datalen, 0, "");
71SYSCTL_STRUCT(_kern_ipc, KIPC_MBSTAT, mbstat, CTLFLAG_RW, &mbstat, mbstat, "");
65
66SYSCTL_DECL(_kern_ipc);
67SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RW,
68 &max_linkhdr, 0, "");
69SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RW,
70 &max_protohdr, 0, "");
71SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, "");
72SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW,
73 &max_datalen, 0, "");
74SYSCTL_STRUCT(_kern_ipc, KIPC_MBSTAT, mbstat, CTLFLAG_RW, &mbstat, mbstat, "");
75SYSCTL_INT(_kern_ipc, KIPC_NMBCLUSTERS, nmbclusters, CTLFLAG_RD,
76 &nmbclusters, 0, "Maximum number of mbuf clusters avaliable");
77#ifndef NMBCLUSTERS
78#define NMBCLUSTERS (512 + MAXUSERS * 16)
79#endif
80TUNABLE_INT_DECL("kern.ipc.nmbclusters", NMBCLUSTERS, nmbclusters);
81TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 4, nmbufs); /* XXX fixup? */
72
73static void m_reclaim __P((void));
74
75/* "number of clusters of pages" */
76#define NCL_INIT 1
77
78#define NMB_INIT 16
79

--- 867 unchanged lines hidden ---
82
83static void m_reclaim __P((void));
84
85/* "number of clusters of pages" */
86#define NCL_INIT 1
87
88#define NMB_INIT 16
89

--- 867 unchanged lines hidden ---