Deleted Added
full compact
kern_mbuf.c (185893) kern_mbuf.c (186287)
1/*-
2 * Copyright (c) 2004, 2005,
3 * Bosko Milekic <bmilekic@FreeBSD.org>. 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

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004, 2005,
3 * Bosko Milekic <bmilekic@FreeBSD.org>. 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

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/kern/kern_mbuf.c 185893 2008-12-10 22:17:09Z bz $");
29__FBSDID("$FreeBSD: head/sys/kern/kern_mbuf.c 186287 2008-12-18 15:56:12Z ru $");
30
31#include "opt_mac.h"
32#include "opt_param.h"
33
34#include <sys/param.h>
35#include <sys/malloc.h>
36#include <sys/systm.h>
37#include <sys/mbuf.h>

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

115 if (nmbclusters == 0)
116 nmbclusters = 1024 + maxusers * 64;
117 nmbjumbop = nmbclusters / 2;
118 nmbjumbo9 = nmbjumbop / 2;
119 nmbjumbo16 = nmbjumbo9 / 2;
120}
121SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL);
122
30
31#include "opt_mac.h"
32#include "opt_param.h"
33
34#include <sys/param.h>
35#include <sys/malloc.h>
36#include <sys/systm.h>
37#include <sys/mbuf.h>

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

115 if (nmbclusters == 0)
116 nmbclusters = 1024 + maxusers * 64;
117 nmbjumbop = nmbclusters / 2;
118 nmbjumbo9 = nmbjumbop / 2;
119 nmbjumbo16 = nmbjumbo9 / 2;
120}
121SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL);
122
123/* XXX: These should be tuneables. Can't change UMA limits on the fly. */
124static int
125sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
126{
127 int error, newnmbclusters;
128
129 newnmbclusters = nmbclusters;
130 error = sysctl_handle_int(oidp, &newnmbclusters, 0, req);
131 if (error == 0 && req->newptr) {

--- 550 unchanged lines hidden ---
123static int
124sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
125{
126 int error, newnmbclusters;
127
128 newnmbclusters = nmbclusters;
129 error = sysctl_handle_int(oidp, &newnmbclusters, 0, req);
130 if (error == 0 && req->newptr) {

--- 550 unchanged lines hidden ---