Author: bz Date: Wed Mar 18 13:47:44 2009 New Revision: 189960 URL: http://svn.freebsd.org/changeset/base/189960
Log: MFC r185893: Make sure nmbclusters are initialized before maxsockets by running the tunable_mbinit() SYSINIT at SI_ORDER_MIDDLE before the init_maxsockets() SYSINT at SI_ORDER_ANY. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_mbuf.c stable/7/sys/kern/uipc_socket.c Modified: stable/7/sys/kern/kern_mbuf.c ============================================================================== --- stable/7/sys/kern/kern_mbuf.c Wed Mar 18 13:40:37 2009 (r189959) +++ stable/7/sys/kern/kern_mbuf.c Wed Mar 18 13:47:44 2009 (r189960) @@ -101,6 +101,11 @@ int nmbjumbo9; /* limits number of 9k 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 Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Wed Mar 18 13:40:37 2009 (r189959) +++ stable/7/sys/kern/uipc_socket.c Wed Mar 18 13:47:44 2009 (r189960) @@ -237,7 +237,8 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsock "Maximum number of sockets avaliable"); /* - * Initialise maxsockets. + * Initialise maxsockets. This SYSINIT must be run after + * tunable_mbinit(). */ static void init_maxsockets(void *ignored) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"