git: deceef2d12b1 - stable/15 - vm_swapout: Fix the build without options RACCT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Oct 2026 17:32:12 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=deceef2d12b12bb9e7de10f9c0859886407087f8
commit deceef2d12b12bb9e7de10f9c0859886407087f8
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-09-29 21:08:17 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-22 15:45:41 +0000
vm_swapout: Fix the build without options RACCT
Reported by: Jenkins
Fixes: da0764f23554 ("vm_swapout: Restore handling of RLIMIT_RSS")
(cherry picked from commit 767cd9bb420008a3ebeef65fe1d31eab60d61028)
---
sys/amd64/conf/GENERIC | 6 +++---
sys/vm/vm_swapout.c | 7 ++++++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index e06c585318b6..106f171a93dc 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -89,9 +89,9 @@ options KDTRACE_FRAME # Ensure frames are compiled in
options KDTRACE_HOOKS # Kernel DTrace hooks
options DDB_CTF # Kernel ELF linker loads CTF data
options INCLUDE_CONFIG_FILE # Include this file in kernel
-options RACCT # Resource accounting framework
-options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
-options RCTL # Resource limits
+#options RACCT # Resource accounting framework
+#ptions RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
+#options RCTL # Resource limits
# Debugging support. Always need this:
options KDB # Enable kernel debugger support.
diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c
index a0c61c33fa5a..6f6b7de2fce9 100644
--- a/sys/vm/vm_swapout.c
+++ b/sys/vm/vm_swapout.c
@@ -295,10 +295,11 @@ vm_daemon(void)
struct thread *td;
struct vmspace *vm;
int breakout, tryagain, attempts;
- uint64_t rsize, ravailable;
+#ifdef RACCT
if (racct_enable && vm_daemon_timeout == 0)
vm_daemon_timeout = hz;
+#endif
while (true) {
mtx_lock(&vm_daemon_mtx);
@@ -370,7 +371,10 @@ again:
&vm->vm_map, limit);
size = vmspace_resident_count(vm);
}
+#ifdef RACCT
if (racct_enable) {
+ uint64_t ravailable, rsize;
+
rsize = IDX_TO_OFF(size);
PROC_LOCK(p);
if (p->p_state == PRS_NORMAL)
@@ -407,6 +411,7 @@ again:
tryagain = 1;
}
}
+#endif
vmspace_free(vm);
sx_slock(&allproc_lock);
PRELE(p);