From nobody Tue Jan 13 14:03:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dr9vL2XqDz6NxWy for ; Tue, 13 Jan 2026 14:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dr9vL0Y4Vz40TW for ; Tue, 13 Jan 2026 14:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768313006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7ESgHqmVzU4q/SIwOz75JFhhVuIqWZaSHhT14n3a/A=; b=sqbNQ2dxmLK5c9VAdivy5rU1IWaQjUGt0BRzPpNZJEqNfjKg9gnEUbsxSYV6vTC66PdKnk EQ3LSDP8+4S2eaJGQ7ESFmpWrh9h3DcdHtvHqm0STvHxMZXv4ZhcT4jWkb6Qjq6RX++JdU povvVTW3Op0fKKeubPaEBVFUm3G3wF5549CAMJh6n7EREIo9xoqB3z7pWwDLRsLkKsEH9g ULQHtuZLTsiMp7CFl53XtxJ/1YEibf3eKRohSocoOtZMPkvTMGEhPOwqMr1caqqLgusYq1 FTFIdLu5rOXqUlRTK5nM+qYl58BKoSMtNHLt+1Fmf32Snc8FsURHgjAKJdzduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768313006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7ESgHqmVzU4q/SIwOz75JFhhVuIqWZaSHhT14n3a/A=; b=XGT8cGfAqtc9q/QxcIUixOZTnOPGTj/XoKuZ9rYmhLrdpDaMcRKXxO4Pdqq0hIX28KY1Km 0MyK2Hs+ZlxvK+Z8yLjWTBcDtv21QgTZHdIHvjuh7RifoNd68qVzmdAAGMbxDQV/T7aU4d sFJRgRy1PoLbXNnr3glPPzH7aaRF0ah2omkPQURdjcdtphCc5aCAuODRKOHY7538fuCXOr zssd6wZdh7TftLTetpXNjerSD4S8HzpjQgZD6m9I625u5No08PXxfXsxen7yTpL8bCuvL5 XXNKuCSgc+74n74h5YDsvh2xX2mECiEIJBllhDKiP/6XJCIGE7ra8fOy2jhg9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768313006; a=rsa-sha256; cv=none; b=i1DLSt18kILYWACY0vIRiHpKs+mODi8ujKOtQT9EKzg06rRFbE42ENrYmK4+pnyJ8xgfza EwCbN4jCfyIpItcPRkb5JjzFZYmqQkgsh7tHm3/MsJYTOpY29Jo0GlS9yJybNArvh0rSF2 NEMikytVAN3MnHI90FojLLg1anISBbcHMWnQHEa32vUniTJNuVphSSskueId/23y60/JwQ EV5rV1Yh0Xw25QP/KFfezzaxRp05QJV7nLNGcgSX5sp2KBcnMcH5qmG5cU4Z9uf7D8vZxH 9ljMCTOCvtwDkBwueD2BXM8JGZPumsbc3Q0wZAtSULyGuspsvlVv8r6K6pOtjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dr9vK6SjHzwx for ; Tue, 13 Jan 2026 14:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a11e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 13 Jan 2026 14:03:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 457b940bfb6a - main - tuning.7: add more explanation about swap (over-)accounting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 457b940bfb6a228af1281f357b627ecf1e26fea5 Auto-Submitted: auto-generated Date: Tue, 13 Jan 2026 14:03:25 +0000 Message-Id: <696650ad.a11e.704a7e09@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=457b940bfb6a228af1281f357b627ecf1e26fea5 commit 457b940bfb6a228af1281f357b627ecf1e26fea5 Author: Konstantin Belousov AuthorDate: 2026-01-12 03:54:58 +0000 Commit: Konstantin Belousov 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