From owner-freebsd-current@FreeBSD.ORG Wed May 14 12:39:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D14B37B401 for ; Wed, 14 May 2003 12:39:39 -0700 (PDT) Received: from basement.kutulu.org (pcp03610121pcs.longhl01.md.comcast.net [68.49.239.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA8C43F75 for ; Wed, 14 May 2003 12:39:38 -0700 (PDT) (envelope-from kutulu@kutulu.org) Received: by basement.kutulu.org (Postfix, from userid 1001) id 0151FA946; Wed, 14 May 2003 15:39:58 -0400 (EDT) Date: Wed, 14 May 2003 15:39:58 -0400 From: Michael Edenfield To: peter.edwards@openet-telecom.com Message-ID: <20030514193958.GA12881@basement.kutulu.org> Mail-Followup-To: peter.edwards@openet-telecom.com, current@freebsd.org References: <20030513182738.GA17766@basement.kutulu.org> <3E82B245000009F1@mail.openet-telecom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <3E82B245000009F1@mail.openet-telecom.com> User-Agent: Mutt/1.4.1i X-Mailer: Mutt http://www.mutt.org/ X-Accept-Language: en X-PGP-Key: http://www.kutulu.org/pgp/kutulu.asc X-PGP-Fingerprint: 1CE0 3C31 7013 D529 406D 37DC 09CC CD84 A46C 878F cc: current@freebsd.org Subject: Re: vm_page_max_wired and gpg... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 19:39:39 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * peter.edwards@openet-telecom.com [0305= 14 15:23]: > >For some time now, gpg has been having issues on my -CURRENT system=20 > >with being unable to mlock() the ~8k buffer it uses to hold the=20 > >decrypted secret key. A ktrace shows that it's being returned an=20 > >EAGAIN from mlock(), which my peeking around has shown could be: > > > >1) I hit the RLIMIT_MLOCK limit on memory locking, or > >2) I hit the system-wide "wired pages" limit. > The kernel has a "max wired pages" limit, that's set when the swapper > starts up to be one third of physical memory. You can see this in > src/sys/vm_pageout.c, on about line 1414: >=20 > > if (vm_page_max_wired =3D=3D 0) > > vm_page_max_wired =3D cnt.v_free_count / 3; >=20 > This is pretty much a third of what you see at boot time (and in > /var/log/messages or dmesg) for "avail memory =3D " Duh, I looked right at this code and somehow it didn't hit me. It=20 makes sense, I've got roughly 22M out of 64M wired at any given time,=20 which is right at the 1/3 limit. Now it's just a matter of finding=20 out what else I'm running that's locking down pages and stop it. --Mike --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+wpuNCczNhKRsh48RApcEAKCeFdb2O5hUl8R8L3Wnyh9QuhBwRgCaAlFU GWKQbENzP/NZjKElOzQxEHc= =EdNC -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--