Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2013 17:20:42 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r254430 - in head: lib/libc/sys sys/sys sys/vm usr.bin/kdump usr.bin/truss
Message-ID:  <201308161720.42632.jhb@freebsd.org>
In-Reply-To: <201308162113.r7GLDtYC062588@svn.freebsd.org>
References:  <201308162113.r7GLDtYC062588@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 
> 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 >= 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.

Forgot to note:

- Handle MAP_PREFAULT_READ in kdump and truss.

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.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308161720.42632.jhb>