1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/compat/freebsd32
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
..
freebsd32_ioctl.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
freebsd32_ioctl.h Provide the structures and ioctl number definition for handling 2011-04-02 15:47:23 +00:00
freebsd32_ipc.h Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to 2010-03-19 11:01:51 +00:00
freebsd32_misc.c Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00
freebsd32_proto.h Regen. 2011-10-14 11:47:14 +00:00
freebsd32_signal.h Constify source argument for siginfo_to_siginfo32(). 2010-07-04 11:43:53 +00:00
freebsd32_syscall.h Regen. 2011-10-14 11:47:14 +00:00
freebsd32_syscalls.c Regen. 2011-10-14 11:47:14 +00:00
freebsd32_sysent.c Regen. 2011-10-14 11:47:14 +00:00
freebsd32_systrace_args.c Regen. 2011-10-14 11:47:14 +00:00
freebsd32_util.h In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
freebsd32.h Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN. 2011-07-18 20:06:15 +00:00
Makefile add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls 2011-03-12 08:51:43 +00:00
syscalls.conf add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls 2011-03-12 08:51:43 +00:00
syscalls.master Add the posix_fadvise(2) system call. It is somewhat similar to 2011-11-04 04:02:50 +00:00