From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 11 18:01:38 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 582E31065673; Tue, 11 Oct 2011 18:01:38 +0000 (UTC) (envelope-from marktinguely@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id EB0038FC1E; Tue, 11 Oct 2011 18:01:37 +0000 (UTC) Received: by vcbf13 with SMTP id f13so8129244vcb.13 for ; Tue, 11 Oct 2011 11:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/CBWcq85otKCdah8C9q6g5mBte3RtCzY+J2TqIoAdY0=; b=HzVgJbrOlETFyf28KPumvMoTuDY3W6T6g66wb5VW3P9dq+2WLRK8GCpPoSnhsv8Dvi qx/BzDtP/C+d1LNZJL5I+wC0MNd+Aw723UKnRvnyuIx3HNmO4GO/c+IA21Qt+Xhdxrmj EiXoOrqPpbEpY6KDe68EMIH1AQtp0C7SX+PBE= Received: by 10.52.37.72 with SMTP id w8mr19392034vdj.32.1318354571577; Tue, 11 Oct 2011 10:36:11 -0700 (PDT) Received: from [192.168.1.100] ([216.129.185.155]) by mx.google.com with ESMTPS id hl5sm23062027vdb.18.2011.10.11.10.36.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Oct 2011 10:36:10 -0700 (PDT) Message-ID: <4E947E85.2040103@gmail.com> Date: Tue, 11 Oct 2011 12:36:05 -0500 From: Mark Tinguely User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Alan Cox References: <20111006160159.GQ1511@deviant.kiev.zoral.com.ua> <4E8FF4B8.7010300@rice.edu> <4E946AFA.6060105@rice.edu> In-Reply-To: <4E946AFA.6060105@rice.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, Wojciech Puchar , 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, 11 Oct 2011 18:01:38 -0000 On 10/11/2011 11:12 AM, Alan Cox wrote: > On 10/10/2011 16:28, Wojciech Puchar wrote: >> is it possible to force VM subsystem to operate on superpages when >> possible - i mean swapping in 2MB chunks? >> > > Currently, no. For some applications, like the Sun/Oracle JVM, that > have code to explicitly manage large pages, there could be some > benefit in the form of reduced overhead. So, it's on my "to do" list, > but no where near the top of that list. > > Alan > Am I correct in remembering that super-pages have to be aligned on the super-page boundary and be contiguous? If so, in the mmap(), he may want to include the 'MAP_FIXED' flag with an address that is on a super-page boundary. Right now, the "VMFS_ALIGNED_SPACE" that does the VA super-page alignment is only used for device pagers. Similarly, if the allocated physical pages for the object are not contiguous, then MAP_PREFAULT_READ will not result in a super-page promotion. --Mark Tinguely