git: 31cc65708c66 - main - man9: Document M_NEVERFREED and VM_ALLOC_NOFREE

From: Bojan Novković <bnovkov_at_FreeBSD.org>
Date: Mon, 05 Aug 2024 16:46:27 UTC
The branch main has been updated by bnovkov:

URL: https://cgit.FreeBSD.org/src/commit/?id=31cc65708c664c2a0257c26503d39ebc506f674e

commit 31cc65708c664c2a0257c26503d39ebc506f674e
Author:     Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2024-07-31 17:36:55 +0000
Commit:     Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2024-08-05 16:41:22 +0000

    man9: Document M_NEVERFREED and VM_ALLOC_NOFREE
    
    Reviewed by:    alc, kib, markj
    Differential Revision:  https://reviews.freebsd.org/D46198
---
 share/man/man9/malloc.9        | 11 ++++++++++-
 share/man/man9/vm_page_alloc.9 |  6 +++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9
index 0ab5b2ed6e8d..d8759a255492 100644
--- a/share/man/man9/malloc.9
+++ b/share/man/man9/malloc.9
@@ -28,7 +28,7 @@
 .\"
 .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $
 .\"
-.Dd October 12, 2022
+.Dd August 4, 2024
 .Dt MALLOC 9
 .Os
 .Sh NAME
@@ -269,6 +269,15 @@ This option should only be used in combination with
 .Dv M_NOWAIT
 when an allocation failure cannot be tolerated by the caller without
 catastrophic effects on the system.
+.It Dv M_NEVERFREED
+This is an internal flag used by the
+.Xr UMA 9
+allocator and should not be used in regular
+.Fn malloc
+invocations.
+See the description of VM_ALLOC_NOFREE in
+.Xr vm_page_alloc 9
+for more details.
 .El
 .Pp
 Exactly one of either
diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9
index 7d6cf1692bb1..4bf8db33a28d 100644
--- a/share/man/man9/vm_page_alloc.9
+++ b/share/man/man9/vm_page_alloc.9
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.Dd July 21, 2024
+.Dd August 4, 2024
 .Dt VM_PAGE_ALLOC 9
 .Os
 .Sh NAME
@@ -307,6 +307,10 @@ pages will be allocated by the caller in the near future.
 must be no larger than 65535.
 If the system is short of free pages, this hint may cause the kernel
 to reclaim memory more aggressively than it would otherwise.
+.It Dv VM_ALLOC_NOFREE
+The caller asserts that the returned page will never be released.
+If this flag is specified, the allocator will try to fetch a page from a
+special per-domain arena in order to curb long-term physical memory fragmentation.
 .El
 .Sh RETURN VALUES
 If the allocation was successful, a pointer to the