diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-06-18 21:51:16 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-06-18 21:51:16 +0000 |
commit | dc46e8536c2f17c3b742ea1dff7f43e4bbfe2592 (patch) | |
tree | 7fd9064a9c683518bc0af027bacce6e3e49d4faa /sys/uvm/uvm_page.c | |
parent | 249e2ac24d76981290d9280d321ecd7ecbdeb0d4 (diff) |
Bring back Mickey's UVM anon change. Testing by thib@, beck@ and
ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.
Diffstat (limited to 'sys/uvm/uvm_page.c')
-rw-r--r-- | sys/uvm/uvm_page.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 2caca1ba938..0390a1b9e46 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.60 2007/05/18 14:41:55 art Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.61 2007/06/18 21:51:15 pedro Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -1040,7 +1040,7 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list) pg->pg_flags = PG_BUSY|PG_CLEAN|PG_FAKE; pg->pg_version++; if (anon) { - anon->u.an_page = pg; + anon->an_page = pg; atomic_setbits_int(&pg->pg_flags, PQ_ANON); #ifdef UBC uvm_pgcnt_anon++; @@ -1168,7 +1168,7 @@ uvm_pagefree(struct vm_page *pg) if (saved_loan_count) return; - } else if (saved_loan_count && (pg->pg_flags & PQ_ANON)) { + } else if (saved_loan_count && pg->uanon) { /* * if our page is owned by an anon and is loaned out to the * kernel then we just want to drop ownership and return. @@ -1177,6 +1177,7 @@ uvm_pagefree(struct vm_page *pg) * page as long as we are holding PQ lock. */ atomic_clearbits_int(&pg->pg_flags, PQ_ANON); + pg->uanon->an_page = NULL; pg->uanon = NULL; return; } @@ -1208,11 +1209,12 @@ uvm_pagefree(struct vm_page *pg) pg->wire_count = 0; uvmexp.wired--; } -#ifdef UBC if (pg->uanon) { + pg->uanon->an_page = NULL; +#ifdef UBC uvm_pgcnt_anon--; - } #endif + } /* * and put on free queue |