Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2007 22:04:10 +0800
From:      LI Xin <delphij@delphij.net>
To:        Randall Stewart <rrs@cisco.com>
Cc:        freebsd-net <freebsd-net@FreeBSD.org>, Christian Brueffer <brueffer@FreeBSD.org>
Subject:   Re: mbuf large clusters
Message-ID:  <45AF7E5A.4080109@delphij.net>
In-Reply-To: <45AF7CF8.6030102@cisco.com>
References:  <45AF55DE.1070700@cisco.com> <45AF7962.7040407@cisco.com>	<20070118135319.GB1874@haakonia.hitnet.RWTH-Aachen.DE> <45AF7CF8.6030102@cisco.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig8EABD3934C6AD61935167CBD
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Randall Stewart wrote:
> Christian Brueffer wrote:
>=20
>>
>> Not sure if I'm understanding you correctly, but kern.ipc.nmbclusters =
is
>> a tunable not a sysctl, so it has to be set in /boot/loader.conf or at=

>> the loader prompt (see loader(8)).
>>
>=20
> Not in current from what I see (if
> I understand this correctly of course):
> -----------------------------------------------------
> static int
> sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
> {
>     int error, newnmbclusters;
>=20
>     newnmbclusters =3D nmbclusters;
>     error =3D sysctl_handle_int(oidp, &newnmbclusters, sizeof(int), req=
);
>     if (error =3D=3D 0 && req->newptr) {
>         if (newnmbclusters > nmbclusters) {
>             nmbclusters =3D newnmbclusters;
>             uma_zone_set_max(zone_clust, nmbclusters);
>             EVENTHANDLER_INVOKE(nmbclusters_change);
>         } else
>             error =3D EINVAL;
>     }
>     return (error);
> }
> SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, CTLTYPE_INT|CTLFLAG_RW,
> &nmbclusters, 0, sysctl_nmbclusters, "IU",
>     "Maximum number of mbuf clusters allowed");
>=20
> -----------------------------------------------------
>=20
> It looks to me like it lets you INCREASE the value from
> the calculated system value.. but NOT shrink it :-0

No, shrinking it is not currently supported...  It can easily trigger
'zonelimit' livelock if not handled properly.  On the other hand, the
code seems to have some problem as it allows setting an upper limit when
there is no upper limit (nmbclusters=3D0).

Cheers,
--=20
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!


--------------enig8EABD3934C6AD61935167CBD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFr35aOfuToMruuMARA+dAAJ9KAEsXi5S02HBFwGxe0EwofXcXggCggiAY
I3XJXARvul3kQG7qCLiPBiA=
=JrWS
-----END PGP SIGNATURE-----

--------------enig8EABD3934C6AD61935167CBD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45AF7E5A.4080109>