1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys/vm
John Baldwin 936c09ac0f Add the posix_fadvise(2) system call. It is somewhat similar to
madvise(2) except that it operates on a file descriptor instead of a
memory region.  It is currently only supported on regular files.

Just as with madvise(2), the advice given to posix_fadvise(2) can be
divided into two types.  The first type provide hints about data access
patterns and are used in the file read and write routines to modify the
I/O flags passed down to VOP_READ() and VOP_WRITE().  These modes are
thus filesystem independent.  Note that to ease implementation (and
since this API is only advisory anyway), only a single non-normal
range is allowed per file descriptor.

The second type of hints are used to hint to the OS that data will or
will not be used.  These hints are implemented via a new VOP_ADVISE().
A default implementation is provided which does nothing for the WILLNEED
request and attempts to move any clean pages to the cache page queue for
the DONTNEED request.  This latter case required two other changes.
First, a new V_CLEANONLY flag was added to vinvalbuf().  This requests
vinvalbuf() to only flush clean buffers for the vnode from the buffer
cache and to not remove any backing pages from the vnode.  This is
used to ensure clean pages are not wired into the buffer cache before
attempting to move them to the cache page queue.  The second change adds
a new vm_object_page_cache() method.  This method is somewhat similar to
vm_object_page_remove() except that instead of freeing each page in the
specified range, it attempts to move clean pages to the cache queue if
possible.

To preserve the ABI of struct file, the f_cdevpriv pointer is now reused
in a union to point to the currently active advice region if one is
present for regular files.

Reviewed by:	jilles, kib, arch@
Approved by:	re (kib)
MFC after:	1 month
2011-11-04 04:02:50 +00:00
..
default_pager.c
device_pager.c Fix a race in the device pager allocation. If another thread won and 2011-07-30 14:13:57 +00:00
memguard.c Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
memguard.h Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c Eliminate duplication of the fake page code and zone by the device and sg 2011-03-11 07:07:48 +00:00
swap_pager.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
swap_pager.h Implement the linprocfs swaps file, providing information about the 2011-08-01 19:12:15 +00:00
uma_core.c Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
uma_dbg.c
uma_dbg.h
uma_int.h 1. Prior to r214782, UMA did not support multipage allocations before 2011-05-21 17:43:43 +00:00
uma.h Make memguard(9) capable to guard uma(9) allocations. 2011-10-12 18:08:28 +00:00
vm_contig.c Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_extern.h Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_fault.c Use the trick of performing the atomic operation on the contained aligned 2011-09-28 14:57:50 +00:00
vm_glue.c All the racct_*() calls need to happen with the proc locked. Fixing this 2011-07-06 20:06:44 +00:00
vm_init.c
vm_kern.c Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to 2011-10-27 16:39:17 +00:00
vm_kern.h
vm_map.c All the racct_*() calls need to happen with the proc locked. Fixing this 2011-07-06 20:06:44 +00:00
vm_map.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
vm_meter.c Fix some locking nits with the p_state field of struct proc: 2011-03-24 18:40:11 +00:00
vm_mmap.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
vm_object.c Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
vm_object.h Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
vm_page.c Add support for VM_ALLOC_WIRED and VM_ALLOC_ZERO to vm_page_alloc_freelist() 2011-11-02 05:42:51 +00:00
vm_page.h Fix grammar. 2011-09-28 16:12:15 +00:00
vm_pageout.c Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomic 2011-09-06 10:30:11 +00:00
vm_pageout.h
vm_pager.c
vm_pager.h
vm_param.h
vm_phys.c Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_phys.h Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_reserv.c Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_reserv.h Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at 2011-10-30 05:06:14 +00:00
vm_unix.c Control the execution permission of the readable segments for 2011-10-15 12:35:18 +00:00
vm_zeroidle.c
vm.h
vnode_pager.c Fix a typo in a comment. 2011-10-14 11:48:32 +00:00
vnode_pager.h In the VOP_PUTPAGES() implementations, change the default error from 2011-06-01 21:00:28 +00:00