History log of /freebsd-11.0-release/lib/libc/sys/madvise.2
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 285428 12-Jul-2015 alc

Correct the description of MADV_DONTNEED. Specifically, after using
MADV_DONTNEED, while pages faults on the affected address range are more
likely to occur, they are not guaranteed to occur.

MFC after: 3 days


# 261290 30-Jan-2014 kib

The posix_madvise(3) and posix_fadvise(2) should return error on
failure, same as posix_fallocate(2).

Noted by: Bob Bishop <rb@gid.co.uk>
Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 227070 04-Nov-2011 jhb

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


# 165903 09-Jan-2007 imp

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 131504 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


# 118684 09-Aug-2003 bms

Add the POSIX 1003.1-2001 posix_madvise() interface.

PR: standards/54634
Reviewed by: das
Approved by: jake (mentor)


# 112881 31-Mar-2003 wes

Add a facility allowing processes to inform the VM subsystem they are
critical and should not be killed when pageout is looking for more
memory pages in all the wrong places.

Reviewed by: arch@
Sponsored by: St. Bernard Software


# 108844 06-Jan-2003 trhodes

Remove redundant documenation.

PR: 46253
Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl>


# 108317 27-Dec-2002 schweikh

english(4) police.


# 108028 18-Dec-2002 ru

mdoc(7) police: Tidy up the syscall language.

Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.


# 107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


# 102340 24-Aug-2002 mike

Note that <sys/types.h> in no longer a prerequisite for <utime.h> and
<sys/mman.h>.


# 84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


# 81352 09-Aug-2001 yar

Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.

Reviewed by: ru


# 79754 15-Jul-2001 dd

Remove whitespace at EOL.


# 69857 11-Dec-2000 ru

mdoc(7) police: use canonical form of .Dd macro.


# 68751 15-Nov-2000 ben

Remove fullstops from the end of .Xr lines in SEE ALSO section.


# 59460 21-Apr-2000 phantom

Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.


# 57550 28-Feb-2000 ps

Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).
This
This feature allows you to specify if mmap'd data is included in
an application's corefile.

Change the type of eflags in struct vm_map_entry from u_char to
vm_eflags_t (an unsigned int).

Reviewed by: dillon,jdp,alfred
Approved by: jkh


# 54467 12-Dec-1999 dillon

Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC to
madvise().

This feature prevents the update daemon from gratuitously flushing
dirty pages associated with a mapped file-backed region of memory. The
system pager will still page the memory as necessary and the VM system
will still be fully coherent with the filesystem. Modifications made
by other means to the same area of memory, for example by write(), are
unaffected. The feature works on a page-granularity basis.

MAP_NOSYNC allows one to use mmap() to share memory between processes
without incuring any significant filesystem overhead, putting it in
the same performance category as SysV Shared memory and anonymous memory.

Reviewed by: julian, alc, dg


# 50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 36688 06-Jun-1998 jkoshy

Spelling nits.

Pointed out by: Sue Blake <sue@welearn.com.au>


# 36649 04-Jun-1998 steve

Fix a bunch of spelling errors.

PR: 6856
Submitted by: Josh Gilliam <josh@quick.net>


# 32131 31-Dec-1997 alex

Convert caddr_t --> void * for sys/mman.h functions.

mlock, mmap, mprotect, msync, munlock, and munmap are defined by
POSIX as taking void *. The const modifier has been added to
mlock, munlock, and mprotect as the standard dictates.

minherit comes from OpenBSD and has been updated to conform with
their recent change to void *.

madvise and mincore are not defined by POSIX, but their arguments
have been modified to be consistent with the POSIX-defined functions.
mincore takes a const pointer, but madvise does not due to the
MADV_FREE case.

Discussed with: bde


# 32118 30-Dec-1997 alex

Fixed formatting of the MADV_FREE flag description.

Pointed out by: bde


# 22993 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 21562 11-Jan-1997 mpp

Some mdoc cleanup. Also added a RETURN VALUES and ERRORS
section.

Part of PR# 1493.


# 18718 05-Oct-1996 wosch

delete doubled words, e.g.: "the the" -> "the"


# 17782 22-Aug-1996 mpp

Correctly use .Fn instead of .Nm to reference function names
in a bunch of man pages.

Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.


# 17229 20-Jul-1996 dyson

Document madvise(2) as it is in FreeBSD.


# 14326 02-Mar-1996 peter

Document the int -> size_t change to the m* syscalls


# 13836 02-Feb-1996 wosch

Submitted by: bruce, davidg, dyson
add a BUG section for mmap with current limitation
section SYNOPSIS completed


# 13599 23-Jan-1996 wosch

note in bugs section: madvise not yet implemented


# 1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.


# 1573 27-May-1994 rgrimes

BSD 4.4 Lite Lib Sources