Date: Thu, 23 Aug 2012 01:00:19 GMT From: Navdeep Parhar <np@FreeBSD.org> To: freebsd-net@FreeBSD.org Subject: Re: kern/170713: [cxgb] Driver must be loaded after boot due to timing issues checking for kern.ipc.nmb* values set via /boot/loader.conf Message-ID: <201208230100.q7N10J9C000372@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/170713; it has been noted by GNATS.
From: Navdeep Parhar <np@FreeBSD.org>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:
Subject: Re: kern/170713: [cxgb] Driver must be loaded after boot due to timing
issues checking for kern.ipc.nmb* values set via /boot/loader.conf
Date: Wed, 22 Aug 2012 17:56:34 -0700
First, note that only kern.ipc.nmbclusters is a valid tunable. The rest
of the nmbXXX settings in your loader.conf have no effect. There are
sysctls but no tunables for the rest.
Take a look at tunable_mbinit in kern_mbuf.c -- on recent FreeBSD
versions it starts with nmbclusters and sizes others based on this. You
can set nmbclusters really high and influence the values of the other
parameters.
In my opinion we should have a TUNABLE_INT_FETCH for all of the nmbXXX
and autocalculate the ones that are not set, just like what we do for
nmbclusters today.
static void
tunable_mbinit(void *dummy)
{
TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters);
/* This has to be done before VM init. */
if (nmbclusters == 0)
nmbclusters = 1024 + maxusers * 64;
nmbjumbop = nmbclusters / 2;
nmbjumbo9 = nmbjumbop / 2;
nmbjumbo16 = nmbjumbo9 / 2;
}
Compare this to the tunable_mbinit in 7 and you can see why the
nmbclusters tunable does not affect the others -- it is updated after
the other values have already been calculated.
static void
tunable_mbinit(void *dummy)
{
/* This has to be done before VM init. */
nmbclusters = 1024 + maxusers * 64;
nmbjumbop = nmbclusters / 2;
nmbjumbo9 = nmbjumbop / 2;
nmbjumbo16 = nmbjumbo9 / 2;
TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters);
}
Regards,
Navdeep
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208230100.q7N10J9C000372>
