1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys
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
..
amd64 Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and 2011-11-01 21:26:57 +00:00
arm - Import the common MII bitbang'ing code from NetBSD and convert drivers to 2011-11-01 16:13:59 +00:00
boot Remove the remnants of /stand/sysinstall. 2011-11-03 12:03:03 +00:00
bsm Add ECAPMODE, "Not permitted in capability mode", a new kernel errno 2011-03-01 13:14:28 +00:00
cam Add descriptor sense support to CAM, and honor sense residuals properly in 2011-10-03 20:32:55 +00:00
cddl Fix typo in copyright notice introduced in r226724 2011-10-25 13:52:38 +00:00
compat Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
conf Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30 2011-11-03 21:20:22 +00:00
contrib Add missing PF_UNLOCK in pf_test 2011-10-30 14:55:00 +00:00
crypto Update Copyright. 2011-10-27 14:15:26 +00:00
ddb Follow up to r225203 refining break-to-debugger run-time configuration 2011-08-27 14:24:27 +00:00
dev Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30 2011-11-03 21:20:22 +00:00
fs Move the cleanup of f_cdevpriv when the reference count of a devfs 2011-11-04 03:39:31 +00:00
gdb Modify kdb_trap() so that it re-calls the dbbe_trap function as long as 2011-02-18 22:25:11 +00:00
geom Add mutex and two flags to make orphan() call properly asynchronous: 2011-11-02 09:24:59 +00:00
gnu Second-to-last commit implementing Capsicum capabilities in the FreeBSD 2011-08-11 12:30:23 +00:00
i386 Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and 2011-11-01 21:26:57 +00:00
ia64 Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
isa Move VT switching hack for suspend/resume from bus drivers to syscons.c 2011-05-09 18:46:49 +00:00
kern Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Add strnlen() to libkern. 2011-10-04 23:53:47 +00:00
mips Add support for VM_ALLOC_WIRED and VM_ALLOC_ZERO to vm_page_alloc_freelist() 2011-11-02 05:42:51 +00:00
modules Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30 2011-11-03 21:20:22 +00:00
net Fix a use-after-free/redzone issue in the routing code. 2011-11-03 18:33:30 +00:00
net80211 Include the tid when printing out crypto replay errors. 2011-10-28 15:47:14 +00:00
netatalk
netgraph - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed 2011-10-27 09:43:25 +00:00
netinet Restore sysctl names for tcp_sendspace/tcp_recvspace. 2011-11-02 20:58:47 +00:00
netinet6 Remove a couple of write-only variables. 2011-11-03 09:09:05 +00:00
netipsec Add missing va_end() in an error case to clean up after va_start() 2011-10-07 21:00:26 +00:00
netipx
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Change some variables from int to size_t. This is more accurate since 2011-01-08 23:06:54 +00:00
nfs In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
nfsclient Merge 220876, 220877, and 221537 from the new NFS client to the old: 2011-08-09 15:29:58 +00:00
nfsserver Fix the NFS servers so that they can do a Lookup of "..", 2011-09-03 00:28:53 +00:00
nlm In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ofed - change "is is" to "is" or "it is" 2011-10-16 14:30:28 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and 2011-11-01 21:26:57 +00:00
pci - Import the common MII bitbang'ing code from NetBSD and convert drivers to 2011-11-01 16:13:59 +00:00
powerpc Adjust the debugger options slightly. This should help me do the right 2011-10-27 13:07:49 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Get rid of D_PSEUDO. 2011-10-18 08:09:44 +00:00
sparc64 Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and 2011-11-01 21:26:57 +00:00
sys Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools GNU awk does not output escaped newlines in multi-line printc statements. This 2011-03-31 21:33:33 +00:00
ufs Fix the wrong commit log message for r226967: "Added missing cache purge 2011-10-31 20:24:33 +00:00
vm Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
x86 Ignore SRAT memory entries if the memory range does not overlap with an 2011-10-05 16:03:47 +00:00
xdr
xen Properly handle suspend/resume events in the Xen device 2011-09-20 23:44:34 +00:00
Makefile Include sys/xen in cscope tag file generation. 2011-06-10 20:51:41 +00:00