summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-08-24 08:39:39 +0000
committerdfr <dfr@FreeBSD.org>1998-08-24 08:39:39 +0000
commit5fdaeb281d55485bff844095417fc1fbe1e45922 (patch)
tree896c704e890ada16cbc9fb366182b5bb739b46ec /sys/vm/vm_pageout.c
parent1fb12a8979b46c244de5277f71b805b2fa8a39ad (diff)
downloadFreeBSD-src-5fdaeb281d55485bff844095417fc1fbe1e45922.zip
FreeBSD-src-5fdaeb281d55485bff844095417fc1fbe1e45922.tar.gz
Change various syscalls to use size_t arguments instead of u_int.
Add some overflow checks to read/write (from bde). Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable. Reviewed by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index ce39df5..2175622 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.123 1998/07/10 17:58:35 alex Exp $
+ * $Id: vm_pageout.c,v 1.124 1998/08/06 08:33:19 dfr Exp $
*/
/*
@@ -362,7 +362,7 @@ vm_pageout_flush(mc, count, flags)
int i;
for (i = 0; i < count; i++) {
- mc[i]->busy++;
+ PAGE_BUSY(mc[i]);
vm_page_protect(mc[i], VM_PROT_READ);
}
@@ -476,7 +476,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only)
actcount = pmap_ts_referenced(VM_PAGE_TO_PHYS(p));
if (actcount) {
- p->flags |= PG_REFERENCED;
+ PAGE_SET_FLAG(p, PG_REFERENCED);
} else if (p->flags & PG_REFERENCED) {
actcount = 1;
}
@@ -485,7 +485,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only)
(p->flags & PG_REFERENCED)) {
vm_page_activate(p);
p->act_count += actcount;
- p->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(p, PG_REFERENCED);
} else if (p->queue == PQ_ACTIVE) {
if ((p->flags & PG_REFERENCED) == 0) {
p->act_count -= min(p->act_count, ACT_DECLINE);
@@ -500,7 +500,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only)
}
} else {
vm_page_activate(p);
- p->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(p, PG_REFERENCED);
if (p->act_count < (ACT_MAX - ACT_ADVANCE))
p->act_count += ACT_ADVANCE;
s = splvm();
@@ -599,7 +599,7 @@ vm_pageout_page_free(vm_page_t m) {
vbusy(vp);
}
- m->flags |= PG_BUSY;
+ PAGE_SET_FLAG(m, PG_BUSY);
vm_page_protect(m, VM_PROT_NONE);
vm_page_free(m);
vm_object_deallocate(object);
@@ -683,7 +683,7 @@ rescan0:
* If the object is not being used, we ignore previous references.
*/
if (m->object->ref_count == 0) {
- m->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(m, PG_REFERENCED);
pmap_clear_reference(VM_PAGE_TO_PHYS(m));
/*
@@ -708,7 +708,7 @@ rescan0:
* inactive queue again.
*/
if ((m->flags & PG_REFERENCED) != 0) {
- m->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(m, PG_REFERENCED);
actcount = pmap_ts_referenced(VM_PAGE_TO_PHYS(m));
vm_page_activate(m);
m->act_count += (actcount + ACT_ADVANCE + 1);
@@ -906,7 +906,7 @@ rescan0:
/*
* Since we have "tested" this bit, we need to clear it now.
*/
- m->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(m, PG_REFERENCED);
/*
* Only if an object is currently being used, do we use the
@@ -1095,7 +1095,7 @@ vm_pageout_page_stats()
actcount = 0;
if (m->flags & PG_REFERENCED) {
- m->flags &= ~PG_REFERENCED;
+ PAGE_CLEAR_FLAG(m, PG_REFERENCED);
actcount += 1;
}
OpenPOWER on IntegriCloud