From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 25 23:35:36 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 248FE106564A; Tue, 25 Oct 2011 23:35:36 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh5.mail.rice.edu (mh5.mail.rice.edu [128.42.199.32]) by mx1.freebsd.org (Postfix) with ESMTP id DD3048FC1B; Tue, 25 Oct 2011 23:35:35 +0000 (UTC) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 20CCE290ACB; Tue, 25 Oct 2011 18:35:35 -0500 (CDT) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 1319029088B; Tue, 25 Oct 2011 18:35:35 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id quFep8pQQpEl; Tue, 25 Oct 2011 18:35:34 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh5.mail.rice.edu (Postfix) with ESMTPSA id C666A2907E1; Tue, 25 Oct 2011 18:35:32 -0500 (CDT) Message-ID: <4EA747B5.9040304@rice.edu> Date: Tue, 25 Oct 2011 18:35:17 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20110922 Thunderbird/7.0 MIME-Version: 1.0 To: Wojciech Puchar References: <20111006160159.GQ1511@deviant.kiev.zoral.com.ua> <4E8FF4B8.7010300@rice.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 26 Oct 2011 01:01:25 +0000 Cc: alc@freebsd.org, Kostik Belousov , hackers@freebsd.org, Grzegorz Kulewski Subject: Re: mmap performance and memory use 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: Tue, 25 Oct 2011 23:35:36 -0000 On 10/10/2011 4:28 PM, Wojciech Puchar wrote: >> >> Notice that vm.pmap.pde.promotions increased by 31. This means that >> 31 superpage mappings were created by promotion from small page >> mappings. > > thank you. i looked at .mappings as it seemed logical for me that is > shows total. > >> In contrast, vm.pmap.pde.mappings counts superpage mappings that are >> created directly and not by promotion from small page mappings. For >> example, if a large executable, such as gcc, is resident in memory, >> the text segment will be pre-mapped using superpage mappings, >> avoiding soft fault and promotion overhead. Similarly, mmap(..., >> MAP_PREFAULT_READ) on a large, memory resident file may pre-map the >> file using superpage mappings. > > your options are not described in mmap manpage nor madvise > (MAP_PREFAULT_READ). > > when can i find the up to date manpage or description? > A few minutes ago, I merged the changes to support and document MAP_PREFAULT_READ into 8-STABLE. So, now it exists in HEAD, 9.0, and 8-STABLE. Alan