From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 9 10:06:05 2012 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 031CD106566B; Sat, 9 Jun 2012 10:06:05 +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 913C28FC12; Sat, 9 Jun 2012 10:06:04 +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 q59A5wET067219; Sat, 9 Jun 2012 13:05:58 +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 q59A5w2A055621; Sat, 9 Jun 2012 13:05:58 +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 q59A5wB8055620; Sat, 9 Jun 2012 13:05:58 +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: Sat, 9 Jun 2012 13:05:58 +0300 From: Konstantin Belousov To: Mikolaj Golub Message-ID: <20120609100558.GM85127@deviant.kiev.zoral.com.ua> References: <86sje5kkl6.fsf@kopusha.home.net> <20120609083822.GJ85127@deviant.kiev.zoral.com.ua> <86obosluvk.fsf@kopusha.home.net> <20120609090740.GL85127@deviant.kiev.zoral.com.ua> <86k3zglsvm.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QV9egoCq9O4JbpTr" Content-Disposition: inline In-Reply-To: <86k3zglsvm.fsf@kopusha.home.net> 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=-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: Alan Cox , Wojciech Puchar , Robert Watson , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: SuperPages utilization survey 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: Sat, 09 Jun 2012 10:06:05 -0000 --QV9egoCq9O4JbpTr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 09, 2012 at 12:46:53PM +0300, Mikolaj Golub wrote: >=20 > On Sat, 9 Jun 2012 12:07:40 +0300 Konstantin Belousov wrote: >=20 > KB> Well, if I see a report informing me that some 2M region contains 51= 2 super > KB> pages, how should I interpret it ? For me, it is only one superpage = (mapping) > KB> that can be created in one 2M region. >=20 > Well, if I see a report like below: >=20 > PID START END PRT RES PRES SUP REF SHD= FL TP PATH > 48568 0x800c00000 0x820c00000 rw- 131072 0 51712 2 0= --S df=20 >=20 > it tells me that for the region 0x800c00000-0x820c00000 (512Mb) we have 1= 31072 > * 4k =3D 512Mb resident and 51712 * 4k =3D 202Mb (a litle less than a hal= f of the > region) promoted (mapped) to superpages. >=20 > If I had number of superpages here I would need additional knowledge (a > superpage size) to calculate how effectively superpages are used. >=20 > But actually, no much difference for me. To get a number of superpages is= it > enough just to divide the result obtained counting normal-sized pages by > (2M/4k) factor? First, there is nothing which would prevent demotion from happens while you iterate over the map, so you could get funyy numbers, like 42 superpages for 2M region with your method. Second, the superpage size if machine-depended, and even single machine could support differently sized superpage. For amd64, hardware can support 2M and 1G pages, and for i386 you can get 4M or 2M depending on PAE config. And last, I in fact do not see much use for any 'superpage count'. Would I would like to see is the TLB miss count for a region. Then I could estimate whether superpage enabling provided some advantage. Just as a note, if there were no accesses to a region after promotion, then promotion is the waste. Anyway, please do not consider this as discouraging you from doing a useful work. --QV9egoCq9O4JbpTr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/TIAYACgkQC3+MBN1Mb4hBTQCeOYZPmAX1mDYqbJM7YRQ3GAMF oRYAoLkfSMEpFHA7Y0DlRVGo182cXee9 =Dh4E -----END PGP SIGNATURE----- --QV9egoCq9O4JbpTr--