aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-06-20 00:48:20 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-06-20 00:48:20 +0000
commit69a78d4666397617a31c8a72887228ea8230f849 (patch)
tree14e8fdc68f6ae7f6fc728034f3327d2b05196aed /sys/vm/vm_pageout.c
parent29dfd70b01ccede6910aa3b690d89889db6103bd (diff)
downloadsrc-69a78d4666397617a31c8a72887228ea8230f849.tar.gz
src-69a78d4666397617a31c8a72887228ea8230f849.zip
Put the scheduler, vmdaemon, and pagedaemon kthreads back under Giant for
now. The proc locking isn't actually safe yet and won't be until the proc locking is finished.
Notes
Notes: svn path=/head/; revision=78481
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index dd96cb250e46..e8389b1a23f1 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1349,6 +1349,7 @@ vm_pageout()
{
int pass;
+ mtx_lock(&Giant);
mtx_lock(&vm_mtx);
/*
@@ -1465,11 +1466,7 @@ vm_pageout()
if (vm_pages_needed)
cnt.v_pdwakeups++;
splx(s);
- mtx_unlock(&vm_mtx);
- mtx_lock(&Giant);
- mtx_lock(&vm_mtx);
vm_pageout_scan(pass);
- mtx_unlock(&Giant);
vm_pageout_deficit = 0;
}
}
@@ -1500,13 +1497,8 @@ vm_daemon()
{
struct proc *p;
-#ifndef rlimlocked
mtx_lock(&Giant);
-#endif
while (TRUE) {
-#ifdef rlimlocked
- mtx_lock(&Giant);
-#endif
mtx_lock(&vm_mtx);
msleep(&vm_daemon_needed, &vm_mtx, PPAUSE, "psleep", 0);
if (vm_pageout_req_swapout) {
@@ -1515,13 +1507,6 @@ vm_daemon()
vm_pageout_req_swapout = 0;
}
mtx_unlock(&vm_mtx);
-#ifdef rlimlocked
- /*
- * XXX: we can't do this yet because Giant still protects
- * the per-process resource limits that we check below.
- */
- mtx_unlock(&Giant);
-#endif
/*
* scan the processes for exceeding their rlimits or if
* process is swapped out -- deactivate pages