diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-03-02 23:07:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-03-02 23:07:56 +0000 |
commit | 80f04a1094415302dbf46acd811f37130c6a3d29 (patch) | |
tree | 39d33b10c7959136b4fe43eb7f5e9bc2ef09032f /sys/uvm/uvm_page.c | |
parent | baa8df024d703544b5f91205b39a53cbd1437f13 (diff) |
Simplify uvm_pagealloc() to only need one atomic operation on the page flags
instead of two, building upon the knowledge of the state uvm_pagealloc_pg()
leaves the uvm_page in.
ok mpi@
Diffstat (limited to 'sys/uvm/uvm_page.c')
-rw-r--r-- | sys/uvm/uvm_page.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 7834b55db82..45f4121783a 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.115 2013/02/07 17:38:12 beck Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.116 2013/03/02 23:07:55 miod Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -989,9 +989,10 @@ uvm_pagealloc(struct uvm_object *obj, voff_t off, struct vm_anon *anon, uvm_pagealloc_pg(pg, obj, off, anon); KASSERT((pg->pg_flags & PG_DEV) == 0); - atomic_setbits_int(&pg->pg_flags, PG_BUSY|PG_CLEAN|PG_FAKE); if (flags & UVM_PGA_ZERO) atomic_clearbits_int(&pg->pg_flags, PG_CLEAN); + else + atomic_setbits_int(&pg->pg_flags, PG_CLEAN); return(pg); |