From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 26 20:12:06 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EDBF106564A for ; Mon, 26 Dec 2011 20:12:06 +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 BCD3C8FC15 for ; Mon, 26 Dec 2011 20:12:04 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pBQKBt1n095078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Dec 2011 22:11:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pBQKBtZ0001508; Mon, 26 Dec 2011 22:11:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBQKBsta001507; Mon, 26 Dec 2011 22:11:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 26 Dec 2011 22:11:53 +0200 From: Kostik Belousov To: Boris Kochergin Message-ID: <20111226201153.GQ50300@deviant.kiev.zoral.com.ua> References: <4EF8C4B1.5050308@acm.poly.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uXC0L8K1G2d8ohZ2" Content-Disposition: inline In-Reply-To: <4EF8C4B1.5050308@acm.poly.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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: freebsd-hackers@freebsd.org Subject: Re: Getting swapped-out memory per process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2011 20:12:06 -0000 --uXC0L8K1G2d8ohZ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 26, 2011 at 02:02:09PM -0500, Boris Kochergin wrote: > Hi. >=20 > Is there a way, from userspace, to get the amount of memory a given=20 > process currently has swapped out? The VM does not track memory 'per process'. Simplifying to the point where the statement becomes false, it assigns the memory pages to the vm objects, and allows to map objects into process address space. Pageout works on the page by page basis, regardless of the page ownership (for the normal pages, using some definition of normal). Since one page can and often is mapped into several address spaces, accounting on the per-process is meaningless or causes the stress of the imagination of somebody who defines the accounting policy. --uXC0L8K1G2d8ohZ2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk741QgACgkQC3+MBN1Mb4gZjgCePktiCpgLoDSFtaoZZdaSPwOK 1+4An1xgdW17YNzSJ/NCpZkcEj75/rpp =SL/q -----END PGP SIGNATURE----- --uXC0L8K1G2d8ohZ2--