aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/madvise.2
Commit message (Collapse)AuthorAgeFilesLines
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Correct the description of MADV_DONTNEED. Specifically, after usingAlan Cox2015-07-121-4/+4
| | | | | | | | | | 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 Notes: svn path=/head/; revision=285428
* The posix_madvise(3) and posix_fadvise(2) should return error onKonstantin Belousov2014-01-301-2/+5
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=261290
* Add the posix_fadvise(2) system call. It is somewhat similar toJohn Baldwin2011-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=227070
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-10/+20
| | | | Notes: svn path=/head/; revision=131504
* Add the POSIX 1003.1-2001 posix_madvise() interface.Bruce M Simpson2003-08-091-1/+24
| | | | | | | | | PR: standards/54634 Reviewed by: das Approved by: jake (mentor) Notes: svn path=/head/; revision=118684
* Add a facility allowing processes to inform the VM subsystem they areWes Peters2003-03-311-0/+9
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=112881
* Remove redundant documenation.Tom Rhodes2003-01-061-14/+1
| | | | | | | | PR: 46253 Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl> Notes: svn path=/head/; revision=108844
* english(4) police.Jens Schweikhardt2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108317
* mdoc(7) police: Tidy up the syscall language.Ruslan Ermilov2002-12-181-2/+2
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=108028
* Uniformly refer to a file system as "file system".Ruslan Ermilov2002-12-121-2/+2
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107788
* Note that <sys/types.h> in no longer a prerequisite for <utime.h> andMike Barcroft2002-08-241-1/+0
| | | | | | | <sys/mman.h>. Notes: svn path=/head/; revision=102340
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-2/+2
| | | | Notes: svn path=/head/; revision=84306
* Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.Yaroslav Tykhiy2001-08-091-5/+1
| | | | | | | Reviewed by: ru Notes: svn path=/head/; revision=81352
* Remove whitespace at EOL.Dima Dorfman2001-07-151-7/+7
| | | | Notes: svn path=/head/; revision=79754
* mdoc(7) police: use canonical form of .Dd macro.Ruslan Ermilov2000-12-111-1/+1
| | | | Notes: svn path=/head/; revision=69857
* Remove fullstops from the end of .Xr lines in SEE ALSO section.Ben Smithurst2000-11-151-1/+1
| | | | Notes: svn path=/head/; revision=68751
* Introduce ".Lb" macro to libc manpages.Alexey Zelkin2000-04-211-0/+2
| | | | | | | More libraries manpages updates following. Notes: svn path=/head/; revision=59460
* Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).Paul Saab2000-02-281-0/+6
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=57550
* Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC toMatthew Dillon1999-12-121-0/+27
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=54467
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Spelling nits.Joseph Koshy1998-06-061-2/+2
| | | | | | | Pointed out by: Sue Blake <sue@welearn.com.au> Notes: svn path=/head/; revision=36688
* Fix a bunch of spelling errors.Steve Price1998-06-041-2/+2
| | | | | | | | PR: 6856 Submitted by: Josh Gilliam <josh@quick.net> Notes: svn path=/head/; revision=36649
* Convert caddr_t --> void * for sys/mman.h functions.Alexander Langer1997-12-311-2/+2
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=32131
* Fixed formatting of the MADV_FREE flag description.Alexander Langer1997-12-301-3/+3
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=32118
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Some mdoc cleanup. Also added a RETURN VALUES and ERRORSMike Pritchard1997-01-111-22/+45
| | | | | | | | | section. Part of PR# 1493. Notes: svn path=/head/; revision=21562
* delete doubled words, e.g.: "the the" -> "the"Wolfram Schneider1996-10-051-1/+2
| | | | Notes: svn path=/head/; revision=18718
* Correctly use .Fn instead of .Nm to reference function namesMike Pritchard1996-08-221-2/+3
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=17782
* Document madvise(2) as it is in FreeBSD.John Dyson1996-07-201-11/+40
| | | | Notes: svn path=/head/; revision=17229
* Document the int -> size_t change to the m* syscallsPeter Wemm1996-03-021-1/+1
| | | | Notes: svn path=/head/; revision=14326
* Submitted by: bruce, davidg, dysonWolfram Schneider1996-02-021-0/+2
| | | | | | | | add a BUG section for mmap with current limitation section SYNOPSIS completed Notes: svn path=/head/; revision=13836
* note in bugs section: madvise not yet implementedWolfram Schneider1996-01-231-1/+6
| | | | Notes: svn path=/head/; revision=13599
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+66
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573