summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-08 02:17:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-08 02:17:09 +0000
commit04e98c16e18d159676d5dc2872523d590e47ea5d (patch)
tree33386627ecaf887d2cf710f8a8e8aa713122c1f2 /sys/uvm
parent5ed17a9eed8f715649e4729358f993e210e6ee25 (diff)
Something is subtly wrong with this. On ramdisks, processes run out of
mappable memory (direct or via execve), perhaps because of the address allocator behind maps and the way wiring counts work?
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_aobj.c4
-rw-r--r--sys/uvm/uvm_fault.c3
-rw-r--r--sys/uvm/uvm_page.c10
3 files changed, 6 insertions, 11 deletions
diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c
index 910197f28fa..1be5f73d011 100644
--- a/sys/uvm/uvm_aobj.c
+++ b/sys/uvm/uvm_aobj.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_aobj.c,v 1.77 2015/02/06 10:58:35 deraadt Exp $ */
+/* $OpenBSD: uvm_aobj.c,v 1.78 2015/02/08 02:17:08 deraadt Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -880,7 +880,6 @@ uao_detach_locked(struct uvm_object *uobj)
}
pmap_page_protect(pg, PROT_NONE);
uao_dropswap(&aobj->u_obj, pg->offset >> PAGE_SHIFT);
- atomic_clearbits_int(&pg->pg_flags, PQ_AOBJ);
uvm_pagefree(pg);
}
uvm_unlock_pageq();
@@ -992,7 +991,6 @@ uao_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
pmap_page_protect(pp, PROT_NONE);
uao_dropswap(uobj, pp->offset >> PAGE_SHIFT);
- atomic_clearbits_int(&pp->pg_flags, PQ_AOBJ);
uvm_lock_pageq();
uvm_pagefree(pp);
uvm_unlock_pageq();
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index 1612f7914bb..c1825482d70 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.82 2015/02/06 10:58:35 deraadt Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.83 2015/02/08 02:17:08 deraadt Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -1388,7 +1388,6 @@ Case2:
*/
atomic_clearbits_int(&pg->pg_flags, PG_CLEAN);
uao_dropswap(uobj, pg->offset >> PAGE_SHIFT);
- atomic_clearbits_int(&pg->pg_flags, PQ_AOBJ);
}
} else {
/* activate it */
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index ef6fcdfed41..0806d733a43 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.134 2015/02/07 01:46:27 kettenis Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.135 2015/02/08 02:17:08 deraadt Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -1053,7 +1053,7 @@ uvm_pagefree(struct vm_page *pg)
}
/* Clean page state bits. */
- KASSERT(!(pg->pg_flags & PQ_AOBJ));
+ flags_to_clear |= PQ_AOBJ; /* XXX: find culprit */
flags_to_clear |= PQ_ENCRYPT|PG_ZERO|PG_FAKE|PG_BUSY|PG_RELEASED|
PG_CLEAN|PG_CLEANCHK;
atomic_clearbits_int(&pg->pg_flags, flags_to_clear);
@@ -1098,12 +1098,10 @@ uvm_page_unbusy(struct vm_page **pgs, int npgs)
if (uobj != NULL) {
uvm_lock_pageq();
pmap_page_protect(pg, PROT_NONE);
- if (pg->pg_flags & PQ_AOBJ) {
+ /* XXX won't happen right now */
+ if (pg->pg_flags & PQ_AOBJ)
uao_dropswap(uobj,
pg->offset >> PAGE_SHIFT);
- atomic_clearbits_int(&pg->pg_flags,
- PQ_AOBJ);
- }
uvm_pagefree(pg);
uvm_unlock_pageq();
} else {