Date: Thu, 11 Oct 2012 23:02:35 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241468 - stable/9/sys/kern Message-ID: <201210112302.q9BN2Zik000462@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Oct 11 23:02:35 2012 New Revision: 241468 URL: http://svn.freebsd.org/changeset/base/241468 Log: MFC r239624: Allow nmbjumbop, nmbjumbo9, and nmbjumbo16 to be set directly via loader tunables. Modified: stable/9/sys/kern/kern_mbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_mbuf.c ============================================================================== --- stable/9/sys/kern/kern_mbuf.c Thu Oct 11 22:46:20 2012 (r241467) +++ stable/9/sys/kern/kern_mbuf.c Thu Oct 11 23:02:35 2012 (r241468) @@ -110,14 +110,23 @@ struct mbstat mbstat; static void tunable_mbinit(void *dummy) { - TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); /* This has to be done before VM init. */ + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); if (nmbclusters == 0) nmbclusters = 1024 + maxusers * 64; - nmbjumbop = nmbclusters / 2; - nmbjumbo9 = nmbjumbop / 2; - nmbjumbo16 = nmbjumbo9 / 2; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbop", &nmbjumbop); + if (nmbjumbop == 0) + nmbjumbop = nmbclusters / 2; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbo9", &nmbjumbo9); + if (nmbjumbo9 == 0) + nmbjumbo9 = nmbclusters / 4; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbo16", &nmbjumbo16); + if (nmbjumbo16 == 0) + nmbjumbo16 = nmbclusters / 8; } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210112302.q9BN2Zik000462>