Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2012 11:05:51 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r242029 - head/sys/kern
Message-ID:  <20121025080551.GG35915@deviant.kiev.zoral.com.ua>
In-Reply-To: <201210250146.q9P1kLi8043704@svn.freebsd.org>
References:  <201210250146.q9P1kLi8043704@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--KgZklqIqQBPBi6XE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 25, 2012 at 01:46:21AM +0000, Alfred Perlstein wrote:
> Author: alfred
> Date: Thu Oct 25 01:46:20 2012
> New Revision: 242029
> URL: http://svn.freebsd.org/changeset/base/242029
>=20
> Log:
>   Allow autotune maxusers > 384 on 64 bit machines
>  =20
>   A default install on large memory machines with multiple 10gigE interfa=
ces
>   were not being given enough mbufs to do full bandwidth TCP or NFS traff=
ic.
>  =20
>   To keep the value somewhat reasonable, we scale back the number of
>   maxuers by 1/6 past the 384 point.  This gives us enough mbufs for most
>   of our pretty basic 10gigE line-speed tests to complete.
>=20
> Modified:
>   head/sys/kern/subr_param.c
>=20
> Modified: head/sys/kern/subr_param.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/kern/subr_param.c	Thu Oct 25 01:27:01 2012	(r242028)
> +++ head/sys/kern/subr_param.c	Thu Oct 25 01:46:20 2012	(r242029)
> @@ -278,8 +278,16 @@ init_param2(long physpages)
>  		maxusers =3D physpages / (2 * 1024 * 1024 / PAGE_SIZE);
>  		if (maxusers < 32)
>  			maxusers =3D 32;
> -		if (maxusers > 384)
> -			maxusers =3D 384;
> +		/*
> +		 * Clips maxusers to 384 on machines with <=3D 4GB RAM or 32bit.
> +		 * Scales it down 6x for large memory machines.
> +		 */
> +		if (maxusers > 384) {
> +			if (sizeof(void *) <=3D 4)
> +			    maxusers =3D 384;
> +			else
> +			    maxusers =3D 384 + ((maxusers - 384) / 6);
> +		}
This is unbelievably weird way to express the '64bit'. The
#ifdef _LP64 is enough there instead of the runtime check.

Also, are you sure that all our 64bit arches do not have KVA limitations ?

--KgZklqIqQBPBi6XE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlCI8t4ACgkQC3+MBN1Mb4jjMACgrmWZ2+UxyxftDso2yCApjU9M
KOkAoMXY4ogVT9jYPN5m5YLv1JzuZ2s5
=4QlO
-----END PGP SIGNATURE-----

--KgZklqIqQBPBi6XE--



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