freebsd-src/sys/vm
Konstantin Belousov 6195b24a79 Revert r173708's modifications to vm_object_page_remove().
Assume that a vnode is mapped shared and mlocked(), and then the vnode
is truncated, or truncated and then again extended past the mapping
point EOF.  Truncation removes the pages past the truncation point,
and if pages are later created at this range, they are not properly
mapped into the mlocked region, and their wiring count is wrong.

The revert leaves the invalidated but wired pages on the object queue,
which means that the pages are found by vm_object_unwire() when the
mapped range is munlock()ed, and reused by the buffer cache when the
vnode is extended again.

The changes in r173708 were required since then vm_map_unwire() looked
at the page tables to find the page to unwire.  This is no longer
needed with the vm_object_unwire() introduction, which follows the
objects shadow chain.

Also eliminate OBJPR_NOTWIRED flag for vm_object_page_remove(), which
is now redundand, we do not remove wired pages.

Reported by:	trasz, Dmitry Sivachenko <trtrmitya@gmail.com>
Suggested and reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-07-25 18:29:06 +00:00
..
_vm_radix.h
default_pager.c
device_pager.c
memguard.c
memguard.h
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c
swap_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
swap_pager.h
uma.h
uma_core.c
uma_dbg.c
uma_dbg.h
uma_int.h
vm.h
vm_domain.c Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
vm_domain.h Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
vm_extern.h
vm_fault.c
vm_glue.c
vm_init.c
vm_kern.c
vm_kern.h
vm_map.c
vm_map.h
vm_meter.c
vm_mmap.c
vm_object.c Revert r173708's modifications to vm_object_page_remove(). 2015-07-25 18:29:06 +00:00
vm_object.h Revert r173708's modifications to vm_object_page_remove(). 2015-07-25 18:29:06 +00:00
vm_page.c
vm_page.h
vm_pageout.c
vm_pageout.h
vm_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vm_pager.h
vm_param.h
vm_phys.c Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
vm_phys.h Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
vm_radix.c
vm_radix.h
vm_reserv.c
vm_reserv.h
vm_unix.c
vm_zeroidle.c
vnode_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vnode_pager.h