svn commit: r269134 - head/sys/vm

Slawa Olhovchenkov slw at zxy.spb.ru
Tue Jul 29 10:38:15 UTC 2014


On Sat, Jul 26, 2014 at 06:10:18PM +0000, Alan Cox wrote:

> Author: alc
> Date: Sat Jul 26 18:10:18 2014
> New Revision: 269134
> URL: http://svnweb.freebsd.org/changeset/base/269134
> 
> Log:
>   When unwiring a region of an address space, do not assume that the
>   underlying physical pages are mapped by the pmap.  If, for example, the
>   application has performed an mprotect(..., PROT_NONE) on any part of the
>   wired region, then those pages will no longer be mapped by the pmap.
>   So, using the pmap to lookup the wired pages in order to unwire them
>   doesn't always work, and when it doesn't work wired pages are leaked.
>   
>   To avoid the leak, introduce and use a new function vm_object_unwire()
>   that locates the wired pages by traversing the object and its backing
>   objects.

MFC planed?

>   At the same time, switch from using pmap_change_wiring() to the recently
>   introduced function pmap_unwire() for unwiring the region's mappings.
>   pmap_unwire() is faster, because it operates a range of virtual addresses
>   rather than a single virtual page at a time.  Moreover, by operating on
>   a range, it is superpage friendly.  It doesn't waste time performing
>   unnecessary demotions.
>   
>   Reported by:	markj
>   Reviewed by:	kib
>   Tested by:	pho, jmg (arm)
>   Sponsored by:	EMC / Isilon Storage Division


More information about the svn-src-head mailing list