From owner-svn-src-all@FreeBSD.ORG Fri Aug 16 21:29:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 75D94C77; Fri, 16 Aug 2013 21:29:49 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 409D0223C; Fri, 16 Aug 2013 21:29:48 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id r7GEs5AG021658; Fri, 16 Aug 2013 16:29:42 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1e96f912ux-1; Fri, 16 Aug 2013 16:29:42 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from [10.104.199.75] (unknown [131.107.165.208]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 7BD4A47C391; Fri, 16 Aug 2013 16:29:41 -0500 (CDT) Subject: Re: svn commit: r254430 - in head: lib/libc/sys sys/sys sys/vm usr.bin/kdump usr.bin/truss Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alan Cox In-Reply-To: <201308161720.42632.jhb@freebsd.org> Date: Fri, 16 Aug 2013 14:29:42 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201308162113.r7GLDtYC062588@svn.freebsd.org> <201308161720.42632.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1085) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 21:29:49 -0000 On Aug 16, 2013, at 2:20 PM, John Baldwin wrote: > On Friday, August 16, 2013 5:13:55 pm John Baldwin wrote: >> Author: jhb >> Date: Fri Aug 16 21:13:55 2013 >> New Revision: 254430 >> URL: http://svnweb.freebsd.org/changeset/base/254430 >>=20 >> Log: >> Add new mmap(2) flags to permit applications to request specific = virtual >> address alignment of mappings. >> - MAP_ALIGNED(n) requests a mapping aligned on a boundary of (1 << = n). >> Requests for n >=3D number of bits in a pointer or less than the = size of >> a page fail with EINVAL. This matches the API provided by NetBSD. >> - MAP_ALIGNED_SUPER is a special case of MAP_ALIGNED. It can be = used >> to optimize the chances of using large pages. By default it will = align >> the mapping on a large page boundary (the system is free to choose = any >> large page size to align to that seems best for the mapping = request). >> However, if the object being mapped is already using large pages, = then >> it will align the virtual mapping to match the existing large = pages in >> the object instead. >> - Internally, VMFS_ALIGNED_SPACE is now renamed to VMFS_SUPER_SPACE, = and >> VMFS_ALIGNED_SPACE(n) is repurposed for specifying a specific = alignment. >> MAP_ALIGNED(n) maps to using VMFS_ALIGNED_SPACE(n), while >> MAP_ALIGNED_SUPER maps to VMFS_SUPER_SPACE. >> - mmap() of a device object now uses VMFS_OPTIMAL_SPACE rather than >> explicitly using VMFS_SUPER_SPACE. All device objects are forced = to >> use a specific color on creation, so VMFS_OPTIMAL_SPACE is = effectively >> equivalent. >=20 > Forgot to note: >=20 > - Handle MAP_PREFAULT_READ in kdump and truss. >=20 > Also, any awkwardness in the mmap(2) text is purely my fault and not = Alan's. > We might tweak it further, but the code is tested and fully reviewed. >=20 Thank you for doing this! Alan