From nobody Sun May 3 15:45:50 2026 X-Original-To: dev-commits-src-branches@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 4g7pyq6T8Lz6W2t8 for ; Sun, 03 May 2026 15:45:55 +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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g7pyq3QNqz3Jnh for ; Sun, 03 May 2026 15:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777823155; 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=FOlbIE+9RNfFjl6usiIz0z57wF+CTtDXh4/3ebFFCVs=; b=v4gZb0sfiqsPLkDnm+v4RoNdb9vE7SbTWkfEFeqmzNCJTGSZ6ExU9gewD+Zo8sFtjqCBtC 7bY3c+4JSit7l0AKemy2BEy9gtzSZtKs9njEA2UkcTrwXkLvdsjTEWTVyyVCoqVQ+KwupB MoFQYCu1xK61vNgoZhmyMGBmQrZtYhKo+OhnR/5HS9sY+OqSVXbFyJtnl+t8LU3c45gMbu WqawIuLRKkRBAG6KOIFq6XNWsH+DhVVcxWfuO9k3YroWdB+D6virfSJXFB7FjPd8G7UM2I ltKdIsWVnIOedo4QBGB/A/DBVh8BGixzeXP2Fwx/IVy4QBlimWC80gk8ttfm8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777823155; a=rsa-sha256; cv=none; b=IH11ruppaddv0XPwUCsNz90tBFgGFsVrWIEoV/ehA3cPPwy2SWDj4yJg/jbd87lOAFC/rw CGT+Ngd7Yviqi0WnzrQphhqFLU6hmlYqllBNsUaa273ML0n1m6AP6VsoKnvrOnT79ivR4k JGpGVXSazMkqOoV5l5+t4Ozdm2MrL+55St+gjl1cHljLvAoEemMBn+58yY24Dp13580Mth 1CIwtEVJvNAMezLIDnEYF19uuo0uhoZYjlMAeXXi4lrY4aDLTAmnNxMqROtqOUrLTGVPsY rkrkLXoKHGkY55fLppbv+HCVcQ+rLYU6XNbZBRk9FlTMviu79VDSgHdnZleKSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777823155; 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=FOlbIE+9RNfFjl6usiIz0z57wF+CTtDXh4/3ebFFCVs=; b=LsRbZxj83mKo3uIt9J/BZcbETUOVxEesrmQMrAitwi5RjsAKmKEDe1sW2D5wK+6hQh1yg1 7U28Nt7ADS/KrRjHcCQKefXuLVnVprQUFuBlCbIVg9fyaiNrDJC3+/rSuACaextiwbZ4Ki OCIxdP6aG8B0quTsbLsPuaK6tWHZlCurwmLrQn11uLcX+6TqbjhmyI/DKYLj4ROWKRDoHI C3GCv4c8cp7wPkO2FYGvXhp+zbxPwfMBe9813K8byMnDFiHHtIOdLpFvgpPKwA8hzgyOu4 pCUo8M99+Hoez+pNcl8Z+OIq5JedFtCu2fA/5mpeO/V5ebnCueVOvI0qhO7cKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g7pyk2Gh5zfnf for ; Sun, 03 May 2026 15:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ebd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 03 May 2026 15:45:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 66c04dcf1386 - stable/15 - vm_swapout: Remove a special case from vm_swapout_map_deactivate_pages() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 66c04dcf1386bf2337e33118db4019b9d0515b58 Auto-Submitted: auto-generated Date: Sun, 03 May 2026 15:45:50 +0000 Message-Id: <69f76dae.1ebd0.1bb6f50c@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66c04dcf1386bf2337e33118db4019b9d0515b58 commit 66c04dcf1386bf2337e33118db4019b9d0515b58 Author: Mark Johnston AuthorDate: 2026-04-15 18:00:38 +0000 Commit: Mark Johnston CommitDate: 2026-05-03 14:58:57 +0000 vm_swapout: Remove a special case from vm_swapout_map_deactivate_pages() John points out that this probably should have been removed in commit 472888018ce, which removed a special case where we'd set desired=0 if the target process has P_INMEM clear. It's not obvious to me that the desired=0 case can't arise by setting an RSS limit to 0, but I'm not sure why we'd try to go the extra mile in that case anyway. Reported by: jhb Reviewed by: kib MFC after: 2 weeks Fixes: 472888018ce1 ("proc: Remove kernel stack swapping support, part 6") Differential Revision: https://reviews.freebsd.org/D56140 (cherry picked from commit b6b0afefec4739923897d984448704ce34a21e6b) --- sys/vm/vm_swapout.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c index f510189d24be..e85a049f46fe 100644 --- a/sys/vm/vm_swapout.c +++ b/sys/vm/vm_swapout.c @@ -222,13 +222,11 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long desired) { vm_map_entry_t tmpe; vm_object_t obj, bigobj; - int nothingwired; if (!vm_map_trylock_read(map)) return; bigobj = NULL; - nothingwired = TRUE; /* * first, search out the biggest object, and try to free pages from @@ -249,8 +247,6 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long desired) VM_OBJECT_RUNLOCK(obj); } } - if (tmpe->wired_count > 0) - nothingwired = FALSE; } if (bigobj != NULL) { @@ -275,15 +271,6 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long desired) } } - /* - * Remove all mappings if a process is swapped out, this will free page - * table pages. - */ - if (desired == 0 && nothingwired) { - pmap_remove(vm_map_pmap(map), vm_map_min(map), - vm_map_max(map)); - } - vm_map_unlock_read(map); }