From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 29 21:17:13 2009 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 DECD4106566C for ; Mon, 29 Jun 2009 21:17:13 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id AC4118FC24 for ; Mon, 29 Jun 2009 21:17:13 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id E36657E837; Mon, 29 Jun 2009 13:17:12 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Mon, 29 Jun 2009 13:17:11 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <4A47FFBD.3070900@cs.rice.edu> In-Reply-To: <4A47FFBD.3070900@cs.rice.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906291317.12040.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Wojciech Puchar , Alan Cox Subject: Re: large pages (amd64) 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, 29 Jun 2009 21:17:14 -0000 On Sunday 28 June 2009 15:41:49 Alan Cox wrote: > Wojciech Puchar wrote: > > how can i check how much (or maybe - what processes) 2MB pages are > > actually allocated? > > I'm afraid that you can't with great precision. For a given program > execution, on an otherwise idle machine, you can only estimate the > number by looking at the change in the quantity "promotions + mappings - > demotions" before, during, and after the program execution. > > A program can call mincore(2) in order to determine if a virtual address > is part of a 2 or 4MB virtual page. Would it be possible to expose the super page count as kve_super in the kinfo_vmentry struct so that procstat can show this information? If only to determine if one is using the feature and possibly benefiting from it. It looks like sys/kern/kern_proc.c could call mincore around the loop at line 1601 (rev 194498), but I know nothing about the vm subsystem to know the implications or locking involved. There's still 16 bytes of spare to consume, in the kve_vminfo struct though ;) -- Mel