summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_glue.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1996-02-22 10:57:37 +0000
committerdg <dg@FreeBSD.org>1996-02-22 10:57:37 +0000
commitf54e4705e69eea4684321d09a2a8c4fab628b5ce (patch)
tree417e29a08626b6c8041f78bb5ff3065d5927f43b /sys/vm/vm_glue.c
parent60f52cc4c159387974b7ca89b671e47d3f44ef62 (diff)
downloadFreeBSD-src-f54e4705e69eea4684321d09a2a8c4fab628b5ce.zip
FreeBSD-src-f54e4705e69eea4684321d09a2a8c4fab628b5ce.tar.gz
Add a "NO_SWAPPING" option to disable swapping. This was originally done
to help diagnose a problem on wcarchive (where the kernel stack was sometimes not present), but is useful in its own right since swapping actually reduces performance on some systems (such as wcarchive). Note: swapping in this context means making the U pages pageable and has nothing to do with generic VM paging, which is unaffected by this option. Reviewed by: <dyson>
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r--sys/vm/vm_glue.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 22bda4f..1d45e37 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -59,7 +59,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_glue.c,v 1.37 1996/01/25 07:15:40 phk Exp $
+ * $Id: vm_glue.c,v 1.38 1996/01/29 12:10:30 davidg Exp $
*/
#include "opt_sysvipc.h"
@@ -484,12 +484,12 @@ loop:
goto loop;
}
+#ifndef NO_SWAPPING
+
#define swappable(p) \
(((p)->p_lock == 0) && \
((p)->p_flag & (P_TRACED|P_NOSWAP|P_SYSTEM|P_INMEM|P_WEXIT|P_PHYSIO|P_SWAPPING)) == P_INMEM)
-extern int vm_pageout_free_min;
-
/*
* Swapout is driven by the pageout daemon. Very simple, we find eligible
* procs and unwire their u-areas. We try to always "swap" at least one
@@ -600,6 +600,7 @@ swapout(p)
p->p_flag &= ~P_SWAPPING;
p->p_swtime = 0;
}
+#endif /* !NO_SWAPPING */
#ifdef DDB
/*
OpenPOWER on IntegriCloud