From owner-freebsd-arch@FreeBSD.ORG Thu Jan 31 09:18:58 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B175EDA9; Thu, 31 Jan 2013 09:18:58 +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 3D7566F0; Thu, 31 Jan 2013 09:18:58 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0V9IrwN026281; Thu, 31 Jan 2013 11:18:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0V9IrwN026281 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0V9IrmJ026280; Thu, 31 Jan 2013 11:18:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 31 Jan 2013 11:18:53 +0200 From: Konstantin Belousov To: Andriy Gapon Subject: Re: axe vm.max_wired [Was: Allow small amount of memory be mlock()'ed by unprivileged process?] Message-ID: <20130131091853.GI2522@kib.kiev.ua> References: <861umkurt8.fsf@ds4.des.no> <20120517055425.GA802@infradead.org> <4FC762DD.90101@FreeBSD.org> <4FC81D9C.2080801@FreeBSD.org> <4FC8E29F.2010806@shatow.net> <4FC95A10.7000806@freebsd.org> <4FC9F94B.8060708@FreeBSD.org> <51098977.4000603@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="puRvKymbJtNrbugC" Content-Disposition: inline In-Reply-To: <51098977.4000603@FreeBSD.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: freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 09:18:58 -0000 --puRvKymbJtNrbugC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 30, 2013 at 10:58:31PM +0200, Andriy Gapon wrote: > on 02/06/2012 14:30 Andriy Gapon said the following: > > o There is also vm.max_wired sysctl (with no equivalent tunable), which > > specifies number of _pages_ that can be wired system wide (by both kern= el and > > userland). But note that the limit applies only to userland requests, = the > > kernel is allowed to wire new pages even when the limit is exceeded. B= y default > > the limit is set to 1/3 of available pages. >=20 > I would like to propose to axe vm.max_wired limit. > It is not good when too many pages are wired, but... >=20 > This limit is quite arbitrary (why 1/3). > It's no good for ZFS systems where e.g. 90% of memory can be normally wir= ed by > ZFS in kernel. >=20 > So this limit should be either axed or perhaps replaced with some much hi= gher > limit like e.g. v_page_count - 2 * v_free_target or some such number "clo= se" to > v_page_count. >=20 I dislike your proposal. The limit is useful to prevent the system from entering live-lock. ZFS-using machines should be tuned. Or finally the ZFS caches should communicate the fact that the pages used are for caches and provide easy way for the VM to request flush. This would be big project indeed. E.g., could ZFS make an impression that zfs-cached pages are cached, to VM ? --puRvKymbJtNrbugC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRCjb9AAoJEJDCuSvBvK1BcREP/A+ujR05ARhoSg+ogHAQmi1X EZl/OngRKYd3SW/WeJV9eCFyPWDVIpnBm+nV4MBn8yVSUM2JCUb5DfPKQoAUUR/6 BV68ruyJrY05sgdbV4LpBHvvp5mT3D3W+eVzsKDad6QNIaCrrHXxrwtUR2G6GlHz n2WXi9h3qQpcCzhicUUNeBs8cjyWp3I8Nz4n52s8d2A1k8ndmtgs6x3bz+Gw7QrI S1xiwEnnKdCUQohKCegjBIyKNDBPWqNEPvPjULoidTBKwlo1uS/91gwSCyCYBN6i KYO3pDfxCU20whMNeVnDdoJ/CN597zZRl7kZIDOPq05kcgOJzrkdC7KpGt0iJ4KK o2q3srY+cPkBL/l5OzqlWhgit1Uc324GhRCPjskhz03S4NsI25I/YMVkzJ+KaxyH BYqJj1ItZcQDJgNEbmI80NiYr0kaJzdltgPiSvlIHBKsLWnCBCYrHQV9Mi8/MsEG uBcVFZWB2NU3RkNv16n7wxxtbsZWDzcW6mThTwHhgZ2QPqL7GnJRDlwcgLwZpznL QOR1PcppPXUhfsLQxXHAeHvlNl2M3e4s93W0xMyhSN00I5eEEfPNIrW9x0Gss8II C6Aq1D42IvjQH1NmvRwNzEz3CKqrqUlijoisIiyHsl5+Mt/YQGCX9PEQvELlpS9X gRDu8rDZNGc3PiVRhcxM =AqzY -----END PGP SIGNATURE----- --puRvKymbJtNrbugC--