From owner-svn-src-head@FreeBSD.ORG Mon Jun 3 07:55:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0C0B39DE; Mon, 3 Jun 2013 07:55:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id A2A961CBB; Mon, 3 Jun 2013 07:55:44 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r537tdYa068932; Mon, 3 Jun 2013 10:55:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r537tdYa068932 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r537tdkj068929; Mon, 3 Jun 2013 10:55:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Jun 2013 10:55:39 +0300 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: svn commit: r251282 - head/sys/kern Message-ID: <20130603075539.GK3047@kib.kiev.ua> References: <201306030416.r534GmCA001872@svn.freebsd.org> <51AC1B49.9090001@mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SdoyoXCIx8sI4ZrW" Content-Disposition: inline In-Reply-To: <51AC1B49.9090001@mu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home 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: Mon, 03 Jun 2013 07:55:45 -0000 --SdoyoXCIx8sI4ZrW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 02, 2013 at 09:27:53PM -0700, Alfred Perlstein wrote: > Hey Konstaintin, shouldn't this be scaled against the actual amount of=20 > KVA we have instead of an arbitrary limit? The commit changes the buffer cache to scale according to the available KVA, making the scaling less dumb. I do not understand what exactly do you want to do, please describe the algorithm you propose to implement instead of my change. >=20 > -Alfred >=20 > On 6/2/13 9:16 PM, Konstantin Belousov wrote: > > Author: kib > > Date: Mon Jun 3 04:16:48 2013 > > New Revision: 251282 > > URL: http://svnweb.freebsd.org/changeset/base/251282 > > > > Log: > > When auto-sizing the buffer cache, limit the amount of physical memo= ry > > used as the estimation of size, to 32GB. This provides around 100K = of > > buffer headers and corresponding KVA for buffer map at the peak. > > Sizing the cache larger is not useful, also resulting in the wasting > > and exhausting of KVA for large machines. > > =20 > > Reported and tested by: bdrewery > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/sys/kern/vfs_bio.c > > > > Modified: head/sys/kern/vfs_bio.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/vfs_bio.c Mon Jun 3 04:11:42 2013 (r251281) > > +++ head/sys/kern/vfs_bio.c Mon Jun 3 04:16:48 2013 (r251282) > > @@ -560,7 +560,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon > > nbuf +=3D min((physmem_est - 4096) / factor, > > 65536 / factor); > > if (physmem_est > 65536) > > - nbuf +=3D (physmem_est - 65536) * 2 / (factor * 5); > > + nbuf +=3D min((physmem_est - 65536) * 2 / (factor * 5), > > + 32 * 1024 * 1024 / (factor * 5)); > > =20 > > if (maxbcache && nbuf > maxbcache / BKVASIZE) > > nbuf =3D maxbcache / BKVASIZE; > > --SdoyoXCIx8sI4ZrW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJRrEv6AAoJEJDCuSvBvK1BLrQQAIWpzL7foVjn/0YwseXBa/QZ 1Nz3Rh3VyA6/QG0xD+XpSp7mlehiFypOnzAhqanEZwt+dTxz2H5VL7MilBF+H2Mo eLRC7PD3mIUg66/PkY6ebhoyWSf5n3+Au8+xl1jub7bfi2KtunCKVIMrk1ss6iEr Um9PR/eFwYnYjiQaZI3eZrDotPi8rqIDr5gJN9wDXd9t/2xxDzXd2tZNiEsgG9sy QL22MnjrsOXFC88QRUFcLLeUxGvyizA91De+lw8Mil7Nd3TcK9AQozzi7H7ZspiT ey0sBGuycUteA3WzdzQMvLQK1pUEBLp+r2Vh9iq6PnTuV3pyAhYU5RnA17GZFaxA cOU5RoFFknPXMlyuU6Axz4J4fMNaFqex3Hl+1bwoDt+eor6hb6/gOWqBlV6mSR0M HkpvdUCLxWVX0Qh4rsP4VuiluyiP40a8xpYqw/Z3cE9sxaju4BOH6/ISZ0pWxzJ2 NN9jwudqdyYvdP4pHjc4CbCfYjbdF37JHaSLycHx23pjsPWLFu/WEzTXjp9ASBXU 5AKggwgY4JKvfyzPjAKcX4kvcdd91Z+RH7GcdFZqmAFG7+22pp+mZ4q2KD0zEkLr E5EaesC3jnKubndZFFMRAQOJynr1cmpzoK8dvLFpR41FxhBZvbHR4gk0sQn9ObwG +wKwX8sZmI3ND5g11tfT =Ib8D -----END PGP SIGNATURE----- --SdoyoXCIx8sI4ZrW--