svn commit: r269134 - head/sys/vm
alc at rice.edu
Sat Aug 2 05:02:42 UTC 2014
On 07/29/2014 05:38, Slawa Olhovchenkov wrote:
> 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
>> 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
> MFC planed?
At some point, yes. However, I'm not sure that it will be MFCed in time
>> 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-all