Page MenuHomeFreeBSD

D22038.diff
No OneTemporary

D22038.diff

diff --git a/sys/vm/vm_swapout.c b/sys/vm/vm_swapout.c
--- a/sys/vm/vm_swapout.c
+++ b/sys/vm/vm_swapout.c
@@ -153,6 +153,11 @@
&swap_idle_threshold2, 0,
"Time before a process will be swapped out");
+static int vm_daemon_timeout = 0;
+SYSCTL_INT(_vm, OID_AUTO, vmdaemon_timeout, CTLFLAG_RW,
+ &vm_daemon_timeout, 0,
+ "Time between vmdaemon runs");
+
static int vm_pageout_req_swapout; /* XXX */
static int vm_daemon_needed;
static struct mtx vm_daemon_mtx;
@@ -374,17 +379,15 @@
int breakout, swapout_flags, 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);
msleep(&vm_daemon_needed, &vm_daemon_mtx, PPAUSE, "psleep",
-#ifdef RACCT
- racct_enable ? hz : 0
-#else
- 0
-#endif
- );
+ vm_daemon_timeout);
swapout_flags = vm_pageout_req_swapout;
vm_pageout_req_swapout = 0;
mtx_unlock(&vm_daemon_mtx);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 17, 12:50 AM (19 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15831329
Default Alt Text
D22038.diff (997 B)

Event Timeline