git: 6aa98f78cc6e - main - conf: Remove kernel stack swapping support, part 12
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jul 2024 01:50:04 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=6aa98f78cc6e527b801cabddf6881ab5c9256934
commit 6aa98f78cc6e527b801cabddf6881ab5c9256934
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-29 01:42:54 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-29 01:43:59 +0000
conf: Remove kernel stack swapping support, part 12
Remove the NO_SWAPPING option. There is still some code in
vm_swapout.c, but it relates to RACCT handling. Remove the option and
make compilation of vm_swapout.c conditional on RACCT.
Tested by: pho
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46130
---
sys/arm/conf/ARMADAXP | 1 -
sys/conf/NOTES | 10 ----------
sys/conf/files | 2 +-
sys/conf/options | 1 -
sys/powerpc/conf/dpaa/DPAA | 1 -
sys/vm/vm_swapout.c | 5 -----
6 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/sys/arm/conf/ARMADAXP b/sys/arm/conf/ARMADAXP
index e198651e69b3..9c045e65e752 100644
--- a/sys/arm/conf/ARMADAXP
+++ b/sys/arm/conf/ARMADAXP
@@ -40,7 +40,6 @@ options ROOTDEVNAME=\"ufs:/dev/da0p1\"
options MUTEX_NOINLINE
options RWLOCK_NOINLINE
options NO_FFS_SNAPSHOT
-options NO_SWAPPING
# Pseudo devices
device pty
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 685125b782ca..555bae187271 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2390,16 +2390,6 @@ options SW_WATCHDOG
#
options DEADLKRES
-#
-# Disable swapping of stack pages. This option removes all
-# code which actually performs swapping, so it's not possible to turn
-# it back on at run-time.
-#
-# This is sometimes usable for systems which don't have any swap space
-# (see also sysctl "vm.disable_swapspace_pageouts")
-#
-#options NO_SWAPPING
-
# Set the number of sf_bufs to allocate. sf_bufs are virtual buffers
# for sendfile(2) that are used to map file VM pages, and normally
# default to a quantity that is roughly 16*MAXUSERS+512. You would
diff --git a/sys/conf/files b/sys/conf/files
index 08b8dbed43b0..5250b65135e6 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -5266,7 +5266,7 @@ vm/vm_pager.c standard
vm/vm_phys.c standard
vm/vm_radix.c standard
vm/vm_reserv.c standard
-vm/vm_swapout.c optional !NO_SWAPPING
+vm/vm_swapout.c optional racct
vm/vm_unix.c standard
vm/vnode_pager.c standard
xen/features.c optional xenhvm
diff --git a/sys/conf/options b/sys/conf/options
index 8464fd919ff0..899fd7869a5e 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -630,7 +630,6 @@ VM_KMEM_SIZE_SCALE opt_vm.h
VM_KMEM_SIZE_MAX opt_vm.h
VM_NRESERVLEVEL opt_vm.h
VM_LEVEL_0_ORDER opt_vm.h
-NO_SWAPPING opt_vm.h
MALLOC_MAKE_FAILURES opt_vm.h
MALLOC_PROFILE opt_vm.h
MALLOC_DEBUG_MAXZONES opt_vm.h
diff --git a/sys/powerpc/conf/dpaa/DPAA b/sys/powerpc/conf/dpaa/DPAA
index 742fdc9da325..323c71048c12 100644
--- a/sys/powerpc/conf/dpaa/DPAA
+++ b/sys/powerpc/conf/dpaa/DPAA
@@ -34,7 +34,6 @@ options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
-options NO_SWAPPING
options KDB #Enable the kernel debugger
options DDB #Support DDB
diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c
index 016cdf2a2cc8..6f7f584ac25f 100644
--- a/sys/vm/vm_swapout.c
+++ b/sys/vm/vm_swapout.c
@@ -68,7 +68,6 @@
* rights to redistribute these changes.
*/
-#include <sys/cdefs.h>
#include "opt_kstack_pages.h"
#include "opt_kstack_max_pages.h"
#include "opt_vm.h"
@@ -293,12 +292,10 @@ vm_daemon(void)
struct thread *td;
struct vmspace *vm;
int breakout, tryagain, attempts;
-#ifdef RACCT
uint64_t rsize, ravailable;
if (racct_enable && vm_daemon_timeout == 0)
vm_daemon_timeout = hz;
-#endif
while (TRUE) {
mtx_lock(&vm_daemon_mtx);
@@ -371,7 +368,6 @@ again:
&vm->vm_map, limit);
size = vmspace_resident_count(vm);
}
-#ifdef RACCT
if (racct_enable) {
rsize = IDX_TO_OFF(size);
PROC_LOCK(p);
@@ -409,7 +405,6 @@ again:
tryagain = 1;
}
}
-#endif
vmspace_free(vm);
sx_slock(&allproc_lock);
PRELE(p);