aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-04-15 18:00:38 +0000
committerMark Johnston <markj@FreeBSD.org>2026-04-15 18:00:38 +0000
commitb6b0afefec4739923897d984448704ce34a21e6b (patch)
tree4c3b3cbb3cf93bc879ce54d879ffa249afb1d4b1
parent0c09c6527b16953d355125bee7a839f743a39dad (diff)
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
-rw-r--r--sys/vm/vm_swapout.c13
1 files changed, 0 insertions, 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);
}