From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 29 00:10:18 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 3A0A1106567A for ; Mon, 29 Jun 2009 00:10:18 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 118848FC1B for ; Mon, 29 Jun 2009 00:10:17 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 0F4302C2AAC; Sun, 28 Jun 2009 18:41:58 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IytAcNxCkx5W; Sun, 28 Jun 2009 18:41:50 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 440162C2B02; Sun, 28 Jun 2009 18:41:50 -0500 (CDT) Message-ID: <4A47FFBD.3070900@cs.rice.edu> Date: Sun, 28 Jun 2009 18:41:49 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.22 (X11/20090626) MIME-Version: 1.0 To: Wojciech Puchar References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, freebsd-hackers@freebsd.org 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 00:10:18 -0000 Wojciech Puchar wrote: >> >> other question - tried enabling it on my i386 laptop (256 megs >> ram), always >> mappings==0, while promitions>demotions>0. >> >> >> The default starting address for executables on i386 is not aligned >> to a 2/4MB page boundary. Hence, "mappings" are much less likely to >> occur. >> >> >> certainly there are apps that could be put on big pages, gimp >> editing 40MB bitmap for >> example >> >> >> Regards, >> Alan >> >> >> > 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. Alan