summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1996-02-22 11:10:09 +0000
committerDavid Greenman <dg@FreeBSD.org>1996-02-22 11:10:09 +0000
commit1f993b918b02880de531c160d2ce268712ec98b5 (patch)
tree6f5b7bf3fb6bad2338a0016ef7c44e0f3a87a436
parent4d1df654da822bc4b1fd3163ec81004236b8f615 (diff)
Notes
-rw-r--r--sys/kern/init_main.c4
-rw-r--r--sys/vm/vm_glue.c7
-rw-r--r--sys/vm/vm_pageout.c32
3 files changed, 27 insertions, 16 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 89874b23d0ecb..eca015b20b954 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.24 1995/05/14 02:59:55 davidg Exp $
+ * $Id: init_main.c,v 1.25 1995/05/19 03:26:43 davidg Exp $
*/
#include <sys/param.h>
@@ -329,6 +329,7 @@ main(framep)
/* NOTREACHED */
}
+#ifndef NO_SWAPPING
/*
* Start high level vm daemon (process 3).
*/
@@ -342,6 +343,7 @@ main(framep)
vm_daemon();
/*NOTREACHED*/
}
+#endif
/*
* Start update daemon (process 4).
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index f5dfdc5738eee..0d83e840620cb 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.20.4.2 1995/10/16 20:43:05 davidg Exp $
+ * $Id: vm_glue.c,v 1.20.4.3 1996/01/29 12:11:30 davidg Exp $
*/
#include <sys/param.h>
@@ -395,12 +395,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
@@ -509,6 +509,7 @@ swapout(p)
p->p_flag &= ~P_SWAPPING;
p->p_swtime = 0;
}
+#endif /* !NO_SWAPPING */
/*
* The rest of these routines fake thread handling
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 436f866066af9..cc5beca095756 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_pageout.c,v 1.51 1995/05/30 08:16:18 rgrimes Exp $
+ * $Id: vm_pageout.c,v 1.51.4.1 1996/01/31 13:12:39 davidg Exp $
*/
/*
@@ -110,6 +110,8 @@ int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT;
int vm_page_max_wired; /* XXX max # of wired pages system-wide */
+static void vm_req_vmdaemon __P((void));
+
/*
* vm_pageout_clean:
* cleans a vm_page
@@ -499,17 +501,6 @@ vm_pageout_map_deactivate_pages(map, entry, count, freeer)
return;
}
-void
-vm_req_vmdaemon()
-{
- static int lastrun = 0;
-
- if ((ticks > (lastrun + hz / 10)) || (ticks < lastrun)) {
- wakeup((caddr_t) &vm_daemon_needed);
- lastrun = ticks;
- }
-}
-
/*
* vm_pageout_scan does the dirty work for the pageout daemon.
*/
@@ -747,6 +738,7 @@ rescan1:
wakeup((caddr_t) &vfs_update_wakeup);
}
}
+#ifndef NO_SWAPPING
/*
* now swap processes out if we are in low memory conditions
*/
@@ -755,12 +747,15 @@ rescan1:
vm_pageout_req_swapout = 1;
vm_req_vmdaemon();
}
+#endif
}
+#ifndef NO_SWAPPING
if ((cnt.v_inactive_count + cnt.v_free_count + cnt.v_cache_count) <
(cnt.v_inactive_target + cnt.v_free_min)) {
vm_req_vmdaemon();
}
+#endif
/*
* make sure that we have swap space -- if we are low on memory and
@@ -876,6 +871,18 @@ vm_pageout()
}
}
+#ifndef NO_SWAPPING
+static void
+vm_req_vmdaemon()
+{
+ static int lastrun = 0;
+
+ if ((ticks > (lastrun + hz / 10)) || (ticks < lastrun)) {
+ wakeup((caddr_t) &vm_daemon_needed);
+ lastrun = ticks;
+ }
+}
+
void
vm_daemon()
{
@@ -957,3 +964,4 @@ restart:
}
vm_object_cache_unlock();
}
+#endif /* !NO_SWAPPING */