git: 10af3b3b71a0 - stable/15 - tuning.7: add more explanation about swap (over-)accounting
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Jan 2026 00:32:25 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=10af3b3b71a0aeb992c5edbba8c4c52715fb7c5b
commit 10af3b3b71a0aeb992c5edbba8c4c52715fb7c5b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-01-12 03:54:58 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-01-24 00:26:45 +0000
tuning.7: add more explanation about swap (over-)accounting
(cherry picked from commit 457b940bfb6a228af1281f357b627ecf1e26fea5)
---
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