From nobody Sun May 3 15:45:50 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 4g7pyk6t9Vz6W2t3 for ; Sun, 03 May 2026 15:45:50 +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 4g7pyk3mTgz3Jkh for ; Sun, 03 May 2026 15:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777823150; 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=iByYGrPuolTcSs29PHQW1Qx+lcyXpxax5ASxiS9VNuPzOTA6oeCQJqTcxZxU+7Z2INgBNa /Ndr3KRsSjBcBMa92zxh12dAHlNROjN+QLRz9Bc/tLX339Xe0SvRwjpjyXbxjj2eugbsXe nKZ17u+e+lqUBptGaorUTvWnnp0HFsfMCXach/suAR2MYWHd9JAMtDG8YOaKBGB3Bf6Ohq rfMhBWspkN1QAZlMAZcm9PNIASdBC2LDrQ12ti3v2Yzdz8l/l4tvjE52ISLaBILLsKsKKb 6nvZaywTkpNEaVrf6gUCdE8x9BhOcylLEa6NklflK1AiUcKNx1Usmm3eRqOADQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777823150; a=rsa-sha256; cv=none; b=omXgu3hVI1OUIApYd+t39zOoUojnUpBWUxCzbZeIOjIjMXsMiqx2gz0Lwy3Bf3jnEIqPy1 2om51DmjJKiztm6Gakf457JV2DxjHzzYcuaCV+qoFX745zLptXR2OGLxV1McJAcDLQQ5DI RhzoQ5GzwDNElTmZjp5IuKy7RdoTMwZrilGP/CxsYPSpZ60GuwJOzK3AddN5EunicuURZ0 /FRF88LUJiyeV/WhSeOL3RQo9mmgm5/c5eF3gzhoVUDbBfpKnDKFEstFHXV/NzPbgz0ObL 3Yfzg5QuUkyorwTULXWIh9rpEeXJKaPsi+a8EPIgsdAaPj5NvY8O07AfzNmOZg== 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=1777823150; 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=IoTgcVdERnioR9uD8y89Xo2yr8LwZVgrqZ9zW7W35xWbJmJhQz3hXliPhERLVpxB8W6Tpn 1v0lvtbcjbMAE+0bI/0+vRjwutHEIDuKaSrDyGsUeK6b9MwaG9KzUdlvEDhmbRsL11GcO8 urPZtn024HXZikscBkB61w91qM1qnVnjqchlRJkWwPsAsamm3EJfeDUwJWfbnMh3oRbNT9 qHhLMlKaQhwLatkGmnDiIGZzUspw2r5/miUFDXPUAqcOqwJcaFUwEgjgsn2bSniKuyW+s8 3nGbaYOGnOEmgVPixggcUdziFxWRwO7IS0q/vZbrHHZWQeBvj92oKlqtapA2XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g7pyk2HVfzg86 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: 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 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); }