Date: Sun, 03 May 2026 15:45:50 +0000 From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 66c04dcf1386 - stable/15 - vm_swapout: Remove a special case from vm_swapout_map_deactivate_pages() Message-ID: <69f76dae.1ebd0.1bb6f50c@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66c04dcf1386bf2337e33118db4019b9d0515b58 commit 66c04dcf1386bf2337e33118db4019b9d0515b58 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-04-15 18:00:38 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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); }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f76dae.1ebd0.1bb6f50c>
