summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-10-28 13:37:02 +0000
committerdg <dg@FreeBSD.org>1998-10-28 13:37:02 +0000
commit20b2c33d9ae555690e09419a1d176600738a144a (patch)
tree74dc0a163081dc84a8bec8ce775734c78d792fba /sys/kern
parentf09370e8b5c92f2d102862a5ba0edda272351bfd (diff)
downloadFreeBSD-src-20b2c33d9ae555690e09419a1d176600738a144a.zip
FreeBSD-src-20b2c33d9ae555690e09419a1d176600738a144a.tar.gz
Added a second argument, "activate" to the vm_page_unwire() call so that
the caller can select either inactive or active queue to put the page on.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c4
-rw-r--r--sys/kern/sys_pipe.c6
-rw-r--r--sys/kern/vfs_bio.c14
3 files changed, 11 insertions, 13 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index d30d9c2..4200adf 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.86 1998/09/04 08:06:55 dfr Exp $
+ * $Id: kern_exec.c,v 1.87 1998/10/16 03:55:00 peter Exp $
*/
#include <sys/param.h>
@@ -408,7 +408,7 @@ exec_unmap_first_page(imgp)
{
if (imgp->firstpage) {
pmap_kremove((vm_offset_t) imgp->image_header);
- vm_page_unwire(imgp->firstpage);
+ vm_page_unwire(imgp->firstpage, 1);
imgp->firstpage = NULL;
}
}
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 9b60e26..5f67897 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: sys_pipe.c,v 1.42 1998/06/07 17:11:39 dfr Exp $
+ * $Id: sys_pipe.c,v 1.43 1998/10/13 08:24:40 dg Exp $
*/
/*
@@ -502,7 +502,7 @@ pipe_build_write_buffer(wpipe, uio)
if (!paddr) {
int j;
for(j=0;j<i;j++)
- vm_page_unwire(wpipe->pipe_map.ms[j]);
+ vm_page_unwire(wpipe->pipe_map.ms[j], 1);
return EFAULT;
}
@@ -566,7 +566,7 @@ struct pipe *wpipe;
}
}
for (i=0;i<wpipe->pipe_map.npages;i++)
- vm_page_unwire(wpipe->pipe_map.ms[i]);
+ vm_page_unwire(wpipe->pipe_map.ms[i], 1);
}
/*
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 8084f3d..e4946b1 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.179 1998/10/13 08:24:40 dg Exp $
+ * $Id: vfs_bio.c,v 1.180 1998/10/25 17:44:52 phk Exp $
*/
/*
@@ -794,7 +794,8 @@ vfs_vmio_release(bp)
for (i = 0; i < bp->b_npages; i++) {
m = bp->b_pages[i];
bp->b_pages[i] = NULL;
- vm_page_unwire(m);
+ if ((bp->b_flags & B_ASYNC) == 0)
+ vm_page_unwire(m, (bp->b_flags & B_ASYNC) == 0 ? 0 : 1);
/*
* We don't mess with busy pages, it is
@@ -806,6 +807,7 @@ vfs_vmio_release(bp)
if (m->wire_count == 0) {
+ vm_page_flag_clear(m, PG_ZERO);
/*
* If this is an async free -- we cannot place
* pages onto the cache queue. If it is an
@@ -830,9 +832,6 @@ vfs_vmio_release(bp)
*/
if (m->dirty == 0 && m->hold_count == 0)
vm_page_cache(m);
- else
- vm_page_deactivate(m);
- vm_page_flag_clear(m, PG_ZERO);
} else if (m->hold_count == 0) {
vm_page_busy(m);
vm_page_protect(m, VM_PROT_NONE);
@@ -844,7 +843,6 @@ vfs_vmio_release(bp)
* act_count.
*/
m->act_count = 0;
- vm_page_flag_clear(m, PG_ZERO);
}
}
}
@@ -1714,7 +1712,7 @@ allocbuf(struct buf * bp, int size)
vm_page_sleep(m, "biodep", &m->busy);
bp->b_pages[i] = NULL;
- vm_page_unwire(m);
+ vm_page_unwire(m, 0);
}
pmap_qremove((vm_offset_t) trunc_page((vm_offset_t)bp->b_data) +
(desiredpages << PAGE_SHIFT), (bp->b_npages - desiredpages));
@@ -2376,7 +2374,7 @@ vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to)
bp->b_pages[index] = NULL;
pmap_kremove(pg);
vm_page_busy(p);
- vm_page_unwire(p);
+ vm_page_unwire(p, 0);
vm_page_free(p);
}
}
OpenPOWER on IntegriCloud