summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2000-05-29 22:40:54 +0000
committerdillon <dillon@FreeBSD.org>2000-05-29 22:40:54 +0000
commit82627e96a026e438a7251b0e5dc0a5322435693c (patch)
tree30efad495e652bce5e17011dd662ffce150ecd07 /sys/vm/vm_pageout.c
parent2e7f60e876b44bc7a2762fa018f17c30864bc19d (diff)
downloadFreeBSD-src-82627e96a026e438a7251b0e5dc0a5322435693c.zip
FreeBSD-src-82627e96a026e438a7251b0e5dc0a5322435693c.tar.gz
This is a cleanup patch to Peter's new OBJT_PHYS VM object type
and sysv shared memory support for it. It implements a new PG_UNMANAGED flag that has slightly different characteristics from PG_FICTICIOUS. A new sysctl, kern.ipc.shm_use_phys has been added to enable the use of physically-backed sysv shared memory rather then swap-backed. Physically backed shm segments are not tracked with PV entries, allowing programs which use a large shm segment as a rendezvous point to operate without eating an insane amount of KVM in the PV entry management. Read: Oracle. Peter's OBJT_PHYS object will also allow us to eventually implement page-table sharing and/or 4MB physical page support for such segments. We're half way there.
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 1627118..307dd0b 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -233,11 +233,12 @@ vm_pageout_clean(m)
*/
/*
- * Don't mess with the page if it's busy.
+ * Don't mess with the page if it's busy, held, or special
*/
if ((m->hold_count != 0) ||
- ((m->busy != 0) || (m->flags & PG_BUSY)))
+ ((m->busy != 0) || (m->flags & (PG_BUSY|PG_UNMANAGED)))) {
return 0;
+ }
mc[vm_pageout_page_count] = m;
pageout_count = 1;
@@ -279,7 +280,7 @@ more:
break;
}
if (((p->queue - p->pc) == PQ_CACHE) ||
- (p->flags & PG_BUSY) || p->busy) {
+ (p->flags & (PG_BUSY|PG_UNMANAGED)) || p->busy) {
ib = 0;
break;
}
@@ -309,7 +310,7 @@ more:
if ((p = vm_page_lookup(object, pindex + is)) == NULL)
break;
if (((p->queue - p->pc) == PQ_CACHE) ||
- (p->flags & PG_BUSY) || p->busy) {
+ (p->flags & (PG_BUSY|PG_UNMANAGED)) || p->busy) {
break;
}
vm_page_test_dirty(p);
@@ -474,7 +475,7 @@ vm_pageout_object_deactivate_pages(map, object, desired, map_remove_only)
if (p->wire_count != 0 ||
p->hold_count != 0 ||
p->busy != 0 ||
- (p->flags & PG_BUSY) ||
+ (p->flags & (PG_BUSY|PG_UNMANAGED)) ||
!pmap_page_exists(vm_map_pmap(map), p)) {
p = next;
continue;
@@ -1047,7 +1048,10 @@ rescan0:
m = vm_page_list_find(PQ_CACHE, cache_rover, FALSE);
if (!m)
break;
- if ((m->flags & PG_BUSY) || m->busy || m->hold_count || m->wire_count) {
+ if ((m->flags & (PG_BUSY|PG_UNMANAGED)) ||
+ m->busy ||
+ m->hold_count ||
+ m->wire_count) {
#ifdef INVARIANTS
printf("Warning: busy page %p found in cache\n", m);
#endif
OpenPOWER on IntegriCloud