From owner-svn-src-head@FreeBSD.ORG Thu Oct 25 08:05:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88A7E551; Thu, 25 Oct 2012 08:05:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 074B68FC08; Thu, 25 Oct 2012 08:05:57 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q9P863I1028237; Thu, 25 Oct 2012 11:06:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q9P85pvQ038985; Thu, 25 Oct 2012 11:05:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q9P85p6Z038984; Thu, 25 Oct 2012 11:05:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Oct 2012 11:05:51 +0300 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: svn commit: r242029 - head/sys/kern Message-ID: <20121025080551.GG35915@deviant.kiev.zoral.com.ua> References: <201210250146.q9P1kLi8043704@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KgZklqIqQBPBi6XE" Content-Disposition: inline In-Reply-To: <201210250146.q9P1kLi8043704@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 08:05:58 -0000 --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--