diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-03-18 13:47:44 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-03-18 13:47:44 +0000 |
commit | fb69735e58c8adb72f7886ef5485d932e4d1d559 (patch) | |
tree | 40b3928c467fcfb5fce1d562c91edbdd171b128a | |
parent | bdcc8446e6dd580b5179379116105d96c1b9657c (diff) |
Notes
-rw-r--r-- | sys/kern/kern_mbuf.c | 7 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 1233d54bd601..b2f284f9d7ab 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -101,6 +101,11 @@ int nmbjumbo9; /* limits number of 9k jumbo clusters */ int nmbjumbo16; /* limits number of 16k jumbo clusters */ struct mbstat mbstat; +/* + * tunable_mbinit() has to be run before init_maxsockets() thus + * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() + * runs at SI_ORDER_ANY. + */ static void tunable_mbinit(void *dummy) { @@ -112,7 +117,7 @@ tunable_mbinit(void *dummy) nmbjumbo16 = nmbjumbo9 / 2; TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); } -SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL); +SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); /* XXX: These should be tuneables. Can't change UMA limits on the fly. */ static int diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 57a2fc316a7e..94a011efe580 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -237,7 +237,8 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsockets, CTLTYPE_INT|CTLFLAG_RW, "Maximum number of sockets avaliable"); /* - * Initialise maxsockets. + * Initialise maxsockets. This SYSINIT must be run after + * tunable_mbinit(). */ static void init_maxsockets(void *ignored) { |