Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2026 00:08:52 +0100
From:      Oliver Pinter <oliver.pntr@gmail.com>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 457b940bfb6a - main - tuning.7: add more explanation about swap (over-)accounting
Message-ID:  <CAPjTQNGOVG=YLqKhrvwYjJg3_ZqD_v=ULUXA_4GBALrbstBB7A@mail.gmail.com>
In-Reply-To: <696650ad.a11e.704a7e09@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hi!

Attached a small fix.

On Tue, Jan 13, 2026 at 3:04 PM Konstantin Belousov <kib@freebsd.org> wrote:
>
> The branch main has been updated by kib:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=457b940bfb6a228af1281f357b627ecf1e26fea5
>
> commit 457b940bfb6a228af1281f357b627ecf1e26fea5
> Author:     Konstantin Belousov <kib@FreeBSD.org>
> AuthorDate: 2026-01-12 03:54:58 +0000
> Commit:     Konstantin Belousov <kib@FreeBSD.org>
> CommitDate: 2026-01-13 14:03:14 +0000
>
>     tuning.7: add more explanation about swap (over-)accounting
>
>     Sponsored by:   The FreeBSD Foundation
>     MFC after:      1 week
>     Differential revision:  https://reviews.freebsd.org/D54572
> ---
>  share/man/man7/tuning.7 | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7
> index 44c427c4559d..a3709ce82b8c 100644
> --- a/share/man/man7/tuning.7
> +++ b/share/man/man7/tuning.7
> @@ -222,6 +222,21 @@ and
>  .Va vm.stats.vm.v_wire_count
>  sysctls, respectively).
>  .Pp
> +Due to the architecture of the
> +.Fx
> +virtual memory subsystem, the use of copy on write (CoW) anonymous
> +memory, e.g. on
> +.Xr fork 2 ,
> +causes swap reservation for all three regions (VM objects),
> +as in the original pre-fork mapping, and its copies in
> +the parent and child, instead of only two.
> +Eventually the subsystem tries to optimize the internal layout
> +of the tracking for CoW and often removes (collapses) no longer
> +needed backing objects, re-assigning its pages and swap
> +reservations to the copies.
> +Coolapsing frees the swap reserve, but it is not guaranteed
> +to happen.
> +.Pp
>  The
>  .Va kern.ipc.maxpipekva
>  loader tunable is used to set a hard limit on the
>

[-- Attachment #2 --]
From 8217ebe6b06112967e0b6c82f7dcdb63879cdc4d Mon Sep 17 00:00:00 2001
From: Oliver Pinter <oliver.pntr+freebsd@gmail.com>
Date: Wed, 14 Jan 2026 00:06:29 +0100
Subject: [PATCH] tuning.7: use the correct word for collapsing

Fixes: 457b940bfb6a228af1281f357b627ecf1e26fea5
Signed-off-by: Oliver Pinter <oliver.pntr+freebsd@gmail.com>
---
 share/man/man7/tuning.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7
index a3709ce82b8c..daf941da5de3 100644
--- a/share/man/man7/tuning.7
+++ b/share/man/man7/tuning.7
@@ -234,7 +234,7 @@ Eventually the subsystem tries to optimize the internal layout
 of the tracking for CoW and often removes (collapses) no longer
 needed backing objects, re-assigning its pages and swap
 reservations to the copies.
-Coolapsing frees the swap reserve, but it is not guaranteed
+Collapsing frees the swap reserve, but it is not guaranteed
 to happen.
 .Pp
 The
-- 
2.50.1 (Apple Git-155)

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNGOVG=YLqKhrvwYjJg3_ZqD_v=ULUXA_4GBALrbstBB7A>