freebsd-dev/sys/vm
Alan Cox 0346250941 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.

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
2014-07-26 18:10:18 +00:00
..
_vm_radix.h On all the architectures, avoid to preallocate the physical memory 2013-08-09 11:28:55 +00:00
default_pager.c
device_pager.c Initialize paddr to handle the case of zero size. 2014-03-12 16:38:55 +00:00
memguard.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
memguard.h Replace kernel virtual address space allocation with vmem. This provides 2013-08-07 06:21:20 +00:00
phys_pager.c The soft and hard busy mechanism rely on the vm object lock to work. 2013-08-09 11:11:11 +00:00
pmap.h Introduce pmap_unwire(). It will replace pmap_change_wiring(). There are 2014-07-06 17:42:38 +00:00
redzone.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
redzone.h
sg_pager.c Different consumers of the struct vm_page abuse pageq member to keep 2013-08-10 17:36:42 +00:00
swap_pager.c Add sysctl OIDs showing the actual size and capacity of the swap zone. 2014-04-26 12:18:17 +00:00
swap_pager.h
uma_core.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
uma_dbg.c - Add a per-zone lock for zones without kegs. 2013-06-20 19:08:12 +00:00
uma_dbg.h
uma_int.h Implement soft pressure on UMA cache bucket sizes. 2013-11-19 10:05:53 +00:00
uma.h Create two public UMA_ZONE_PCPU zones: 64 bit sized and pointer sized. 2014-02-10 19:59:46 +00:00
vm_extern.h When unwiring a region of an address space, do not assume that the 2014-07-26 18:10:18 +00:00
vm_fault.c When unwiring a region of an address space, do not assume that the 2014-07-26 18:10:18 +00:00
vm_glue.c - Modify vm_page_unwire() and vm_page_enqueue() to directly accept 2014-06-16 18:15:27 +00:00
vm_init.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vm_kern.c - Modify vm_page_unwire() and vm_page_enqueue() to directly accept 2014-06-16 18:15:27 +00:00
vm_kern.h - Add a statically allocated memguard arena since it is needed very early 2013-08-13 22:40:43 +00:00
vm_map.c When unwiring a region of an address space, do not assume that the 2014-07-26 18:10:18 +00:00
vm_map.h Add MAP_EXCL flag for mmap(2). It should be combined with MAP_FIXED, 2014-06-19 05:00:39 +00:00
vm_meter.c Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
vm_mmap.c Remove ia64. 2014-07-07 00:27:09 +00:00
vm_object.c When unwiring a region of an address space, do not assume that the 2014-07-26 18:10:18 +00:00
vm_object.h When unwiring a region of an address space, do not assume that the 2014-07-26 18:10:18 +00:00
vm_page.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vm_page.h - Modify vm_page_unwire() and vm_page_enqueue() to directly accept 2014-06-16 18:15:27 +00:00
vm_pageout.c Remove ia64. 2014-07-07 00:27:09 +00:00
vm_pageout.h
vm_pager.c - Add a general purpose resource allocator, vmem, from NetBSD. It was 2013-06-28 03:51:20 +00:00
vm_pager.h - Add a general purpose resource allocator, vmem, from NetBSD. It was 2013-06-28 03:51:20 +00:00
vm_param.h Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
vm_phys.c vm_phys: remove limitation on number of fictitious regions 2014-07-09 08:12:58 +00:00
vm_phys.h Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
vm_radix.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vm_radix.h Eliminate a redundant parameter to vm_radix_replace(). 2013-12-08 20:07:02 +00:00
vm_reserv.c Correct a bug in the management of the population map on big-endian 2014-06-11 16:11:12 +00:00
vm_reserv.h
vm_unix.c Remove ia64. 2014-07-07 00:27:09 +00:00
vm_zeroidle.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vm.h rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST 2013-07-24 09:45:31 +00:00
vnode_pager.c Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
vnode_pager.h