aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/mlock.2
Commit message (Collapse)AuthorAgeFilesLines
* libsys: relocate implementations and manpagesBrooks Davis2024-02-051-176/+0
| | | | | | | | | Remove core system call implementations and documentation to lib/libsys and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>. Update paths to allow libc to find them in their new home. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
* lib: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Provide separate accounting for user-wired pages.Mark Johnston2019-05-131-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically we have not distinguished between kernel wirings and user wirings for accounting purposes. User wirings (via mlock(2)) were subject to a global limit on the number of wired pages, so if large swaths of physical memory were wired by the kernel, as happens with the ZFS ARC among other things, the limit could be exceeded, causing user wirings to fail. The change adds a new counter, v_user_wire_count, which counts the number of virtual pages wired by user processes via mlock(2) and mlockall(2). Only user-wired pages are subject to the system-wide limit which helps provide some safety against deadlocks. In particular, while sources of kernel wirings typically support some backpressure mechanism, there is no way to reclaim user-wired pages shorting of killing the wiring process. The limit is exported as vm.max_user_wired, renamed from vm.max_wired, and changed from u_int to u_long. The choice to count virtual user-wired pages rather than physical pages was done for simplicity. There are mechanisms that can cause user-wired mappings to be destroyed while maintaining a wiring of the backing physical page; these make it difficult to accurately track user wirings at the physical page layer. The change also closes some holes which allowed user wirings to succeed even when they would cause the system limit to be exceeded. For instance, mmap() may now fail with ENOMEM in a process that has called mlockall(MCL_FUTURE) if the new mapping would cause the user wiring limit to be exceeded. Note that bhyve -S is subject to the user wiring limit, which defaults to 1/3 of physical RAM. Users that wish to exceed the limit must tune vm.max_user_wired. Reviewed by: kib, ngie (mlock() test changes) Tested by: pho (earlier version) MFC after: 45 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D19908 Notes: svn path=/head/; revision=347532
* Remove a lingering inaccuracy from mlock.2.Mark Johnston2018-03-201-4/+2
| | | | | | | | | | User wirings of the same address range don't stack. Noted by: Dan Nelson MFC after: 3 days Notes: svn path=/head/; revision=331260
* mlock(2): correct documentation for error conditions.Alan Somers2018-01-221-3/+3
| | | | | | | | | | | | | | | The man page is years out of date regarding errors. Our implementation _does_ allow unaligned addresses, and it _does_not_ check for negative lengths, because the length is unsigned. It checks for overflow instead. Update the tests accordingly. Reviewed by: bcr MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D13826 Notes: svn path=/head/; revision=328266
* 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
* Minor mdoc fixBenjamin Kaduk2014-05-301-1/+1
| | | | | | | | Submitted by: hrs Approved by: hrs (mentor, implicit) Notes: svn path=/head/; revision=266866
* Correct documentation of the limit on how much memory can be mlock()edBenjamin Kaduk2014-05-171-7/+14
| | | | | | | | | | | | vm.max_wired is a system-wide limit, not per-process. Reword the section to make this more clear. PR: docs/189214 Submitted by: Lawrence Chen (original text) Approved by: hrs (mentor) Notes: svn path=/head/; revision=266285
* There are actually two different cases when mlock(2) returnsGleb Smirnoff2013-03-191-2/+7
| | | | | | | | | ENOMEM. Clarify this, taking text from SUS. Reviewed by: kib Notes: svn path=/head/; revision=248489
* - Update manual pages accordingly to r244384 and r244385.Andrey Zonov2012-12-251-6/+11
| | | | | | | | Approved by: kib (mentor) MFC after: 1 week Notes: svn path=/head/; revision=244679
* Update mlockall(2) to mention that it's superuser-only syscall, justEdward Tomasz Napierala2010-07-271-3/+4
| | | | | | | | | | like the mlock(2) manual page says. Update mlock(2) to say that hitting RLIMIT_MEMLOCK results in ENOMEM, not EAGAIN. MFC after: 1 month Notes: svn path=/head/; revision=210551
* 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
* Sort sections.Ruslan Ermilov2005-01-201-7/+7
| | | | Notes: svn path=/head/; revision=140505
* Scheduled mdoc(7) sweep.Ruslan Ermilov2005-01-111-2/+2
| | | | Notes: svn path=/head/; revision=140081
* Add necessary whitespace to correct cross references.Ceri Davies2004-10-271-2/+2
| | | | | | | | PR: docs/73193 Submitted by: Jilles Tjoelker <jilles at stack.nl> Notes: svn path=/head/; revision=136993
* Update "documentation date" fields.Brian Feldman2004-08-101-1/+1
| | | | Notes: svn path=/head/; revision=133439
* Update mlock(2) manpage to cross-reference m{,un}lockall(2), removeBrian Feldman2004-08-101-1/+5
| | | | | | | | a case where ENOMEM could be returned by munlock(2), and add possible system deadlock to the BUGS section. Notes: svn path=/head/; revision=133437
* Update the document date.Alan Cox2004-05-201-1/+1
| | | | | | | Reminded by: ru@ Notes: svn path=/head/; revision=129508
* Remove a long obsolete paragraph from the BUGS section.Alan Cox2004-05-191-10/+0
| | | | Notes: svn path=/head/; revision=129414
* mdoc(7) police: "The .Fa argument.".Ruslan Ermilov2002-12-191-2/+2
| | | | Notes: svn path=/head/; revision=108087
* mdoc(7) police: Tidy up the syscall language.Ruslan Ermilov2002-12-181-5/+9
| | | | | | | | | | | | | 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
* 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 ``.Rv -std'' wherever possible.Ruslan Ermilov2001-08-311-7/+4
| | | | | | | Submitted by: yar Notes: svn path=/head/; revision=82642
* mdoc(7) police: protect trailing full stops of abbreviationsRuslan Ermilov2001-08-101-1/+1
| | | | | | | with a trailing zero-width space: `e.g.\&'. Notes: svn path=/head/; revision=81449
* Properly separate paragraphs by using `.Pp' instead of a blank line.Chris Costello2000-06-231-1/+1
| | | | Notes: svn path=/head/; revision=62022
* Introduce ".Lb" macro to libc manpages.Alexey Zelkin2000-04-211-0/+2
| | | | | | | More libraries manpages updates following. Notes: svn path=/head/; revision=59460
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Document that mlock() and munlock() can return EPERM if theMike Pritchard1999-06-271-1/+9
| | | | | | | | | | caller is not the super-user. Also document that we do not currently support the per-process RLIMIT_MEMLOCK limit. PR: doc/11607 Notes: svn path=/head/; revision=48262
* Added cross references to mincore(2) and minherit(2).Alexander Langer1998-01-201-0/+3
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=32638
* 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
* Correctly use .Fn instead of .Nm to reference function namesMike Pritchard1996-08-221-12/+13
| | | | | | | | | | | 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
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+161
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573