Date: Fri, 16 Aug 2013 14:29:42 -0700 From: Alan Cox <alc@rice.edu> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r254430 - in head: lib/libc/sys sys/sys sys/vm usr.bin/kdump usr.bin/truss Message-ID: <F6EA84C6-FE78-4ED8-85F6-60C2A8F6EE30@rice.edu> In-Reply-To: <201308161720.42632.jhb@freebsd.org> References: <201308162113.r7GLDtYC062588@svn.freebsd.org> <201308161720.42632.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F6EA84C6-FE78-4ED8-85F6-60C2A8F6EE30>