summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_fault.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-08-11 10:57:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-08-11 10:57:23 +0000
commit7a180b0dffd8a6191dc39c284c4b43646bbe8ac6 (patch)
tree5442aa1b4d2ff26b5330a6478a7d647080cc100a /sys/uvm/uvm_fault.c
parent511fb2556ded7a7b5ce46090532eccce46d77468 (diff)
Various random fixes from NetBSD.
Including support for zeroing pages in the idle loop (not enabled yet).
Diffstat (limited to 'sys/uvm/uvm_fault.c')
-rw-r--r--sys/uvm/uvm_fault.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index ab60ff2a081..b848a3a3353 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_fault.c,v 1.17 2001/07/26 19:37:13 art Exp $ */
-/* $NetBSD: uvm_fault.c,v 1.47 2000/01/11 06:57:50 chs Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.18 2001/08/11 10:57:22 art Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.48 2000/04/10 01:17:41 thorpej Exp $ */
/*
*
@@ -1601,8 +1601,16 @@ Case2:
#endif
anon = uvm_analloc();
- if (anon)
- pg = uvm_pagealloc(NULL, 0, anon, 0);
+ if (anon) {
+ /*
+ * In `Fill in data...' below, if
+ * uobjpage == PGO_DONTCARE, we want
+ * a zero'd, dirty page, so have
+ * uvm_pagealloc() do that for us.
+ */
+ pg = uvm_pagealloc(NULL, 0, anon,
+ (uobjpage == PGO_DONTCARE) ? UVM_PGA_ZERO : 0);
+ }
#ifdef __GNUC__
else
pg = NULL; /* XXX: gcc */
@@ -1691,7 +1699,10 @@ Case2:
} else {
uvmexp.flt_przero++;
- uvm_pagezero(pg); /* zero page [pg now dirty] */
+ /*
+ * Page is zero'd and marked dirty by uvm_pagealloc()
+ * above.
+ */
UVMHIST_LOG(maphist," zero fill anon/page 0x%x/0%x",
anon, pg, 0, 0);
}