freebsd-skq/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 Place VM objects on the object list when created and never remove them. 2015-05-08 19:43:37 +00:00
device_pager.c Place VM objects on the object list when created and never remove them. 2015-05-08 19:43:37 +00:00
memguard.c
memguard.h
phys_pager.c Place VM objects on the object list when created and never remove them. 2015-05-08 19:43:37 +00:00
pmap.h
redzone.c
redzone.h
sg_pager.c Place VM objects on the object list when created and never remove them. 2015-05-08 19:43:37 +00:00
swap_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
swap_pager.h
uma_core.c Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
uma_dbg.c If INVARIANTS is specified, add ctor/dtor to junk memory if they are 2015-06-25 20:44:46 +00:00
uma_dbg.h
uma_int.h
uma.h The vmem callback to reclaim kmem arena address space on low or 2015-05-09 20:08:36 +00:00
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 Add a new file operations hook for mmap operations. File type-specific 2015-06-04 19:41:15 +00:00
vm_fault.c Make KPI of vm_pager_get_pages() more strict: if a pager changes a page 2015-06-12 11:32:20 +00:00
vm_glue.c Make KPI of vm_pager_get_pages() more strict: if a pager changes a page 2015-06-12 11:32:20 +00:00
vm_init.c
vm_kern.c Correct a type error in kmem_unback(). Previously, kmem_unback() did not 2015-06-10 05:17:14 +00:00
vm_kern.h
vm_map.c Account for the main process stack being one page below the highest 2015-07-02 15:22:13 +00:00
vm_map.h
vm_meter.c Place VM objects on the object list when created and never remove them. 2015-05-08 19:43:37 +00:00
vm_mmap.c Add a local variable initialization needed in the OBJT_DEFAULT case. 2015-07-05 22:26:19 +00:00
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 Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages. 2015-06-08 04:59:32 +00:00
vm_page.h The intention of r254304 was to scan the active queue continuously. 2015-07-08 17:45:59 +00:00
vm_pageout.c The intention of r254304 was to scan the active queue continuously. 2015-07-08 17:45:59 +00:00
vm_pageout.h
vm_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vm_pager.h o Un-inline vm_pager_get_pages(), vm_pager_get_pages_async(). 2015-06-17 22:44:27 +00:00
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 Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages. 2015-06-08 04:59:32 +00:00
vm_reserv.h
vm_unix.c Implement lockless resource limits. 2015-06-10 10:48:12 +00:00
vm_zeroidle.c
vm.h
vnode_pager.c Refactor unmapped buffer address handling. 2015-07-23 19:13:41 +00:00
vnode_pager.h