summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/pmap.c8
-rw-r--r--sys/arch/hppa/hppa/pmap.c6
-rw-r--r--sys/arch/hppa64/hppa64/pmap.c10
-rw-r--r--sys/arch/i386/i386/pmap.c8
-rw-r--r--sys/arch/i386/i386/pmapae.c4
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c4
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c8
-rw-r--r--sys/kern/kern_malloc_debug.c4
-rw-r--r--sys/uvm/uvm_amap.c8
-rw-r--r--sys/uvm/uvm_anon.c8
-rw-r--r--sys/uvm/uvm_aobj.c34
-rw-r--r--sys/uvm/uvm_fault.c62
-rw-r--r--sys/uvm/uvm_km.c28
-rw-r--r--sys/uvm/uvm_loan.c32
-rw-r--r--sys/uvm/uvm_map.c10
-rw-r--r--sys/uvm/uvm_page.c47
-rw-r--r--sys/uvm/uvm_page.h6
-rw-r--r--sys/uvm/uvm_page_i.h42
-rw-r--r--sys/uvm/uvm_pager.c36
-rw-r--r--sys/uvm/uvm_pdaemon.c28
-rw-r--r--sys/uvm/uvm_pglist.c18
-rw-r--r--sys/uvm/uvm_vnode.c64
22 files changed, 230 insertions, 245 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index 016e52fc058..7bc5bf1a2b5 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.17 2007/02/03 16:48:23 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.18 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
@@ -1169,7 +1169,7 @@ pmap_get_ptp(struct pmap *pmap, vaddr_t va, pd_entry_t **pdes)
if (ptp == NULL)
return NULL;
- ptp->flags &= ~PG_BUSY; /* never busy */
+ ptp->pg_flags &= ~PG_BUSY; /* never busy */
ptp->wire_count = 1;
pmap->pm_ptphint[i - 2] = ptp;
pa = VM_PAGE_TO_PHYS(ptp);
@@ -1365,7 +1365,7 @@ pmap_destroy(struct pmap *pmap)
for (i = 0; i < PTP_LEVELS - 1; i++) {
while ((pg = TAILQ_FIRST(&pmap->pm_obj[i].memq)) != NULL) {
- KASSERT((pg->flags & PG_BUSY) == 0);
+ KASSERT((pg->pg_flags & PG_BUSY) == 0);
pg->wire_count = 0;
uvm_pagefree(pg);
@@ -2593,7 +2593,7 @@ pmap_get_physpage(vaddr_t va, int level, paddr_t *paddrp)
UVM_PGA_USERESERVE|UVM_PGA_ZERO);
if (ptp == NULL)
panic("pmap_get_physpage: out of memory");
- ptp->flags &= ~PG_BUSY;
+ ptp->pg_flags &= ~PG_BUSY;
ptp->wire_count = 1;
*paddrp = VM_PAGE_TO_PHYS(ptp);
}
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index ea588f86dfa..89324c58fc1 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.128 2005/12/25 21:39:04 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.129 2007/04/04 17:44:45 art Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -195,7 +195,7 @@ pmap_pde_alloc(struct pmap *pm, vaddr_t va, struct vm_page **pdep)
DPRINTF(PDB_FOLLOW|PDB_VP, ("pmap_pde_alloc: pde %x\n", pa));
- pg->flags &= ~PG_BUSY; /* never busy */
+ pg->pg_flags &= ~PG_BUSY; /* never busy */
pg->wire_count = 1; /* no mappings yet */
pmap_pde_set(pm, va, pa);
pm->pm_stats.resident_count++; /* count PTP as resident */
@@ -235,7 +235,7 @@ pmap_pde_release(struct pmap *pmap, vaddr_t va, struct vm_page *ptp)
pmap->pm_ptphint = TAILQ_FIRST(&pmap->pm_obj.memq);
ptp->wire_count = 0;
#ifdef DIAGNOSTIC
- if (ptp->flags & PG_BUSY)
+ if (ptp->pg_flags & PG_BUSY)
panic("pmap_pde_release: busy page table page");
#endif
uvm_pagefree(ptp);
diff --git a/sys/arch/hppa64/hppa64/pmap.c b/sys/arch/hppa64/hppa64/pmap.c
index e0b8547d7d8..cba255bbb89 100644
--- a/sys/arch/hppa64/hppa64/pmap.c
+++ b/sys/arch/hppa64/hppa64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.3 2005/12/25 21:39:06 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.4 2007/04/04 17:44:45 art Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -166,7 +166,7 @@ pmap_pde_alloc(struct pmap *pm, vaddr_t va, struct vm_page **pdep)
DPRINTF(PDB_FOLLOW|PDB_VP, ("pmap_pde_alloc: pde %lx\n", pa));
- pg->flags &= ~PG_BUSY; /* never busy */
+ pg->pg_flags &= ~PG_BUSY; /* never busy */
pg->wire_count = 1; /* no mappings yet */
pmap_pde_set(pm, va, pa);
pm->pm_stats.resident_count++; /* count PTP as resident */
@@ -206,7 +206,7 @@ pmap_pde_release(struct pmap *pmap, vaddr_t va, struct vm_page *ptp)
pmap->pm_ptphint = NULL;
ptp->wire_count = 0;
#ifdef DIAGNOSTIC
- if (ptp->flags & PG_BUSY)
+ if (ptp->pg_flags & PG_BUSY)
panic("pmap_pde_release: busy page table page");
#endif
pdcache(HPPA_SID_KERNEL, (vaddr_t)ptp, PAGE_SIZE);
@@ -626,13 +626,13 @@ pmap_create()
panic("pmap_create: no pages");
pg = TAILQ_FIRST(&pmap->pm_pglist);
- pg->flags &= ~(PG_BUSY|PG_CLEAN);
+ pg->pg_flags &= ~(PG_BUSY|PG_CLEAN);
pmap->pm_pdir = (u_int32_t *)(pa = VM_PAGE_TO_PHYS(pg));
bzero((void *)pa, PAGE_SIZE);
/* set the first PIE that's covering low 2g of the address space */
pg = TAILQ_LAST(&pmap->pm_pglist, pglist);
- pg->flags &= ~(PG_BUSY|PG_CLEAN);
+ pg->pg_flags &= ~(PG_BUSY|PG_CLEAN);
*pmap->pm_pdir = (pa = VM_PAGE_TO_PHYS(pg)) >> PAGE_SHIFT;
bzero((void *)pa, PAGE_SIZE);
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index f7b6394269c..cf71ffb5b7a 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.99 2007/03/18 14:23:57 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.100 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -1246,7 +1246,7 @@ pmap_alloc_pvpage(struct pmap *pmap, int mode)
vm_map_min(kernel_map),
NULL, UVM_PGA_USERESERVE);
if (pg)
- pg->flags &= ~PG_BUSY; /* never busy */
+ pg->pg_flags &= ~PG_BUSY; /* never busy */
simple_unlock(&uvmexp.kmem_object->vmobjlock);
splx(s);
@@ -1641,7 +1641,7 @@ pmap_alloc_ptp(struct pmap *pmap, int pde_index, boolean_t just_try)
return (NULL);
/* got one! */
- ptp->flags &= ~PG_BUSY; /* never busy */
+ ptp->pg_flags &= ~PG_BUSY; /* never busy */
ptp->wire_count = 1; /* no mappings yet */
pmap->pm_pdir[pde_index] =
(pd_entry_t) (VM_PAGE_TO_PHYS(ptp) | PG_u | PG_RW | PG_V);
@@ -1818,7 +1818,7 @@ pmap_release(struct pmap *pmap)
while (!TAILQ_EMPTY(&pmap->pm_obj.memq)) {
pg = TAILQ_FIRST(&pmap->pm_obj.memq);
#ifdef DIAGNOSTIC
- if (pg->flags & PG_BUSY)
+ if (pg->pg_flags & PG_BUSY)
panic("pmap_release: busy page table page");
#endif
/* pmap_page_protect? currently no need for it. */
diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c
index 1c46b9a97f2..136cb4d5b3d 100644
--- a/sys/arch/i386/i386/pmapae.c
+++ b/sys/arch/i386/i386/pmapae.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmapae.c,v 1.9 2007/03/26 08:43:34 art Exp $ */
+/* $OpenBSD: pmapae.c,v 1.10 2007/04/04 17:44:45 art Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
@@ -983,7 +983,7 @@ pmap_alloc_ptp_pae(struct pmap *pmap, int pde_index, boolean_t just_try)
return(NULL);
/* got one! */
- ptp->flags &= ~PG_BUSY; /* never busy */
+ ptp->pg_flags &= ~PG_BUSY; /* never busy */
ptp->wire_count = 1; /* no mappings yet */
PDE(pmap, pde_index) =
(pd_entry_t)(VM_PAGE_TO_PHYS(ptp) | PG_u | PG_RW | PG_V);
diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c
index b4d2433cf01..99a5ff6ee8f 100644
--- a/sys/arch/m68k/m68k/pmap_motorola.c
+++ b/sys/arch/m68k/m68k/pmap_motorola.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.c,v 1.50 2007/03/04 16:59:03 miod Exp $ */
+/* $OpenBSD: pmap_motorola.c,v 1.51 2007/04/04 17:44:45 art Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -2679,7 +2679,7 @@ pmap_enter_ptpage(pmap, va)
UVM_PGA_ZERO)) == NULL) {
uvm_wait("ptpage");
}
- pg->flags &= ~(PG_BUSY|PG_FAKE);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
ptpa = VM_PAGE_TO_PHYS(pg);
pmap_enter(pmap_kernel(), va, ptpa,
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index c24a6ffe362..6b44839be2f 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.34 2007/01/12 19:19:34 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.35 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -3679,7 +3679,7 @@ vm_page_alloc1()
struct vm_page *pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
if (pg) {
pg->wire_count = 1; /* no mappings yet */
- pg->flags &= ~PG_BUSY; /* never busy */
+ pg->pg_flags &= ~PG_BUSY; /* never busy */
}
return pg;
}
@@ -3696,13 +3696,13 @@ void
vm_page_free1(mem)
struct vm_page *mem;
{
- if (mem->flags != (PG_CLEAN|PG_FAKE)) {
+ if (mem->pg_flags != (PG_CLEAN|PG_FAKE)) {
printf("Freeing invalid page %p\n", mem);
printf("pa = %llx\n", (unsigned long long)VM_PAGE_TO_PHYS(mem));
Debugger();
return;
}
- mem->flags |= PG_BUSY;
+ mem->pg_flags |= PG_BUSY;
mem->wire_count = 0;
uvm_pagefree(mem);
}
diff --git a/sys/kern/kern_malloc_debug.c b/sys/kern/kern_malloc_debug.c
index dcd39cfeb49..f6ec3efd608 100644
--- a/sys/kern/kern_malloc_debug.c
+++ b/sys/kern/kern_malloc_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc_debug.c,v 1.23 2004/06/20 01:04:28 art Exp $ */
+/* $OpenBSD: kern_malloc_debug.c,v 1.24 2007/04/04 17:44:45 art Exp $ */
/*
* Copyright (c) 1999, 2000 Artur Grabowski <art@openbsd.org>
@@ -252,7 +252,7 @@ debug_malloc_allocate_free(int wait)
simple_lock(&uvmexp.kmem_object->vmobjlock);
pg = uvm_pagealloc(uvmexp.kmem_object, offset, NULL, 0);
if (pg) {
- pg->flags &= ~PG_BUSY; /* new page */
+ pg->pg_flags &= ~PG_BUSY; /* new page */
UVM_PAGE_OWN(pg, NULL);
}
simple_unlock(&uvmexp.kmem_object->vmobjlock);
diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c
index c8cfeaed7dd..c251225eff8 100644
--- a/sys/uvm/uvm_amap.c
+++ b/sys/uvm/uvm_amap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_amap.c,v 1.33 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_amap.c,v 1.34 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_amap.c,v 1.27 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -797,8 +797,8 @@ ReStart:
* if the page is busy then we have to unlock, wait for
* it and then restart.
*/
- if (pg->flags & PG_BUSY) {
- pg->flags |= PG_WANTED;
+ if (pg->pg_flags & PG_BUSY) {
+ pg->pg_flags |= PG_WANTED;
amap_unlock(amap);
UVM_UNLOCK_AND_WAIT(pg, &anon->an_lock, FALSE,
"cownow", 0);
@@ -843,7 +843,7 @@ ReStart:
* owner locked the whole time it can't be
* PG_RELEASED | PG_WANTED.
*/
- npg->flags &= ~(PG_BUSY|PG_FAKE);
+ npg->pg_flags &= ~(PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(npg, NULL);
uvm_lock_pageq();
uvm_pageactivate(npg);
diff --git a/sys/uvm/uvm_anon.c b/sys/uvm/uvm_anon.c
index 1f323336e5d..6da4ac1979e 100644
--- a/sys/uvm/uvm_anon.c
+++ b/sys/uvm/uvm_anon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_anon.c,v 1.25 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_anon.c,v 1.26 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_anon.c,v 1.10 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -231,9 +231,9 @@ uvm_anfree(anon)
* free it now.
*/
- if ((pg->flags & PG_BUSY) != 0) {
+ if ((pg->pg_flags & PG_BUSY) != 0) {
/* tell them to dump it when done */
- pg->flags |= PG_RELEASED;
+ pg->pg_flags |= PG_RELEASED;
UVMHIST_LOG(maphist,
" anon %p, page %p: BUSY (released!)",
anon, pg, 0, 0);
@@ -508,7 +508,7 @@ anon_pagein(anon)
uobj = pg->uobject;
uvm_swap_free(anon->an_swslot, 1);
anon->an_swslot = 0;
- pg->flags &= ~(PG_CLEAN);
+ pg->pg_flags &= ~(PG_CLEAN);
/*
* deactivate the page (to put it on a page queue)
diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c
index 4c756bb114a..86df760cc18 100644
--- a/sys/uvm/uvm_aobj.c
+++ b/sys/uvm/uvm_aobj.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_aobj.c,v 1.31 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_aobj.c,v 1.32 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -692,8 +692,8 @@ uao_detach_locked(uobj)
busybody = FALSE;
for (pg = TAILQ_FIRST(&uobj->memq); pg != NULL; pg = next) {
next = TAILQ_NEXT(pg, listq);
- if (pg->flags & PG_BUSY) {
- pg->flags |= PG_RELEASED;
+ if (pg->pg_flags & PG_BUSY) {
+ pg->pg_flags |= PG_RELEASED;
busybody = TRUE;
continue;
}
@@ -905,8 +905,8 @@ uao_flush(uobj, start, stop, flags)
/*
* mark the page as released if its busy.
*/
- if (pp->flags & PG_BUSY) {
- pp->flags |= PG_RELEASED;
+ if (pp->pg_flags & PG_BUSY) {
+ pp->pg_flags |= PG_RELEASED;
continue;
}
@@ -1005,7 +1005,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
NULL, UVM_PGA_ZERO);
if (ptmp) {
/* new page */
- ptmp->flags &= ~(PG_BUSY|PG_FAKE);
+ ptmp->pg_flags &= ~(PG_BUSY|PG_FAKE);
ptmp->pqflags |= PQ_AOBJ;
UVM_PAGE_OWN(ptmp, NULL);
}
@@ -1015,7 +1015,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* to be useful must get a non-busy, non-released page
*/
if (ptmp == NULL ||
- (ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ (ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
if (lcv == centeridx ||
(flags & PGO_ALLPAGES) != 0)
/* need to do a wait or I/O! */
@@ -1028,7 +1028,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* result array
*/
/* caller must un-busy this page */
- ptmp->flags |= PG_BUSY;
+ ptmp->pg_flags |= PG_BUSY;
UVM_PAGE_OWN(ptmp, "uao_get1");
pps[lcv] = ptmp;
gotpages++;
@@ -1122,8 +1122,8 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
}
/* page is there, see if we need to wait on it */
- if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
- ptmp->flags |= PG_WANTED;
+ if ((ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ ptmp->pg_flags |= PG_WANTED;
UVMHIST_LOG(pdhist,
"sleeping, ptmp->flags 0x%lx\n",
ptmp->flags,0,0,0);
@@ -1140,7 +1140,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* loop).
*/
/* we own it, caller must un-busy */
- ptmp->flags |= PG_BUSY;
+ ptmp->pg_flags |= PG_BUSY;
UVM_PAGE_OWN(ptmp, "uao_get2");
pps[lcv] = ptmp;
}
@@ -1186,7 +1186,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
{
UVMHIST_LOG(pdhist, "<- done (error=%ld)",
rv,0,0,0);
- if (ptmp->flags & PG_WANTED)
+ if (ptmp->pg_flags & PG_WANTED)
wakeup(ptmp);
/*
@@ -1199,7 +1199,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
SWSLOT_BAD);
uvm_swap_markbad(swslot, 1);
- ptmp->flags &= ~(PG_WANTED|PG_BUSY);
+ ptmp->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(ptmp, NULL);
uvm_lock_pageq();
uvm_pagefree(ptmp);
@@ -1221,7 +1221,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* => activate the page
*/
- ptmp->flags &= ~PG_FAKE; /* data is valid ... */
+ ptmp->pg_flags &= ~PG_FAKE; /* data is valid ... */
pmap_clear_modify(ptmp); /* ... and clean */
pps[lcv] = ptmp;
@@ -1259,7 +1259,7 @@ uao_releasepg(pg, nextpgp)
{
struct uvm_aobj *aobj = (struct uvm_aobj *) pg->uobject;
- KASSERT(pg->flags & PG_RELEASED);
+ KASSERT(pg->pg_flags & PG_RELEASED);
/*
* dispose of the page [caller handles PG_WANTED] and swap slot.
@@ -1506,7 +1506,7 @@ uao_pagein_page(aobj, pageidx)
return FALSE;
}
- KASSERT((pg->flags & PG_RELEASED) == 0);
+ KASSERT((pg->pg_flags & PG_RELEASED) == 0);
/*
* ok, we've got the page now.
@@ -1514,7 +1514,7 @@ uao_pagein_page(aobj, pageidx)
*/
slot = uao_set_swslot(&aobj->u_obj, pageidx, 0);
uvm_swap_free(slot, 1);
- pg->flags &= ~(PG_BUSY|PG_CLEAN|PG_FAKE);
+ pg->pg_flags &= ~(PG_BUSY|PG_CLEAN|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
/*
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index 348db5c3779..b791efe8499 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.43 2007/03/26 08:43:34 art Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.44 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -201,7 +201,7 @@ uvmfault_anonflush(anons, n)
continue;
simple_lock(&anons[lcv]->an_lock);
pg = anons[lcv]->u.an_page;
- if (pg && (pg->flags & PG_BUSY) == 0 && pg->loan_count == 0) {
+ if (pg && (pg->pg_flags & PG_BUSY) == 0 && pg->loan_count == 0) {
uvm_lock_pageq();
if (pg->wire_count == 0) {
#ifdef UBC
@@ -342,11 +342,11 @@ uvmfault_anonget(ufi, amap, anon)
* locks (including uobject) and try again.
*/
- if ((pg->flags & (PG_BUSY|PG_RELEASED)) == 0) {
+ if ((pg->pg_flags & (PG_BUSY|PG_RELEASED)) == 0) {
UVMHIST_LOG(maphist, "<- OK",0,0,0,0);
return (VM_PAGER_OK);
}
- pg->flags |= PG_WANTED;
+ pg->pg_flags |= PG_WANTED;
uvmexp.fltpgwait++;
/*
@@ -435,12 +435,12 @@ uvmfault_anonget(ufi, amap, anon)
if (we_own) {
- if (pg->flags & PG_WANTED) {
+ if (pg->pg_flags & PG_WANTED) {
/* still holding object lock */
wakeup(pg);
}
/* un-busy! */
- pg->flags &= ~(PG_WANTED|PG_BUSY|PG_FAKE);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
/*
@@ -448,7 +448,7 @@ uvmfault_anonget(ufi, amap, anon)
* no longer part of an amap. we need to free the
* anon and try again.
*/
- if (pg->flags & PG_RELEASED) {
+ if (pg->pg_flags & PG_RELEASED) {
pmap_page_protect(pg, VM_PROT_NONE);
simple_unlock(&anon->an_lock);
uvm_anfree(anon); /* frees page for us */
@@ -839,7 +839,7 @@ ReFault:
simple_lock(&anon->an_lock);
/* ignore loaned pages */
if (anon->u.an_page && anon->u.an_page->loan_count == 0 &&
- (anon->u.an_page->flags & (PG_RELEASED|PG_BUSY)) == 0) {
+ (anon->u.an_page->pg_flags & (PG_RELEASED|PG_BUSY)) == 0) {
uvm_lock_pageq();
uvm_pageactivate(anon->u.an_page); /* reactivate */
uvm_unlock_pageq();
@@ -945,7 +945,7 @@ ReFault:
pages[lcv] == PGO_DONTCARE)
continue;
- KASSERT((pages[lcv]->flags & PG_RELEASED) == 0);
+ KASSERT((pages[lcv]->pg_flags & PG_RELEASED) == 0);
/*
* if center page is resident and not
@@ -999,7 +999,7 @@ ReFault:
* we've had the handle.
*/
- pages[lcv]->flags &= ~(PG_BUSY); /* un-busy! */
+ pages[lcv]->pg_flags &= ~(PG_BUSY); /* un-busy! */
UVM_PAGE_OWN(pages[lcv], NULL);
} /* for "lcv" loop */
pmap_update(ufi.orig_map->pmap);
@@ -1162,7 +1162,7 @@ ReFault:
anon->u.an_page = pg;
pg->uanon = anon;
pg->pqflags |= PQ_ANON;
- pg->flags &= ~(PG_BUSY|PG_FAKE);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
/* done! */
@@ -1214,7 +1214,7 @@ ReFault:
/* got all resources, replace anon with nanon */
uvm_pagecopy(oanon->u.an_page, pg); /* pg now !PG_CLEAN */
- pg->flags &= ~(PG_BUSY|PG_FAKE); /* un-busy! new page */
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE); /* un-busy! new page */
UVM_PAGE_OWN(pg, NULL);
amap_add(&ufi.entry->aref, ufi.orig_rvaddr - ufi.entry->start,
anon, 1);
@@ -1288,7 +1288,7 @@ ReFault:
* clear its clean flag now.
*/
- pg->flags &= ~(PG_CLEAN);
+ pg->pg_flags &= ~(PG_CLEAN);
uvm_anon_dropswap(anon);
} else {
/* activate it */
@@ -1403,7 +1403,7 @@ Case2:
* we unlock and clean up.
*/
- if ((uobjpage->flags & PG_RELEASED) != 0 ||
+ if ((uobjpage->pg_flags & PG_RELEASED) != 0 ||
(locked && amap &&
amap_lookup(&ufi.entry->aref,
ufi.orig_rvaddr - ufi.entry->start))) {
@@ -1421,11 +1421,11 @@ Case2:
UVMHIST_LOG(maphist,
" wasn't able to relock after fault: retry",
0,0,0,0);
- if (uobjpage->flags & PG_WANTED)
+ if (uobjpage->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(uobjpage);
- if (uobjpage->flags & PG_RELEASED) {
+ if (uobjpage->pg_flags & PG_RELEASED) {
uvmexp.fltpgrele++;
KASSERT(uobj->pgops->pgo_releasepg != NULL);
@@ -1441,7 +1441,7 @@ Case2:
uvm_pageactivate(uobjpage);
uvm_unlock_pageq();
- uobjpage->flags &= ~(PG_BUSY|PG_WANTED);
+ uobjpage->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(uobjpage, NULL);
simple_unlock(&uobj->vmobjlock);
goto ReFault;
@@ -1509,9 +1509,9 @@ Case2:
* drop ownership of page, it can't
* be released
*/
- if (uobjpage->flags & PG_WANTED)
+ if (uobjpage->pg_flags & PG_WANTED)
wakeup(uobjpage);
- uobjpage->flags &= ~(PG_BUSY|PG_WANTED);
+ uobjpage->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(uobjpage, NULL);
uvm_lock_pageq();
@@ -1538,12 +1538,12 @@ Case2:
* rename the pages.
*/
uvm_pagecopy(uobjpage, pg); /* old -> new */
- pg->flags &= ~(PG_FAKE|PG_CLEAN);
+ pg->pg_flags &= ~(PG_FAKE|PG_CLEAN);
pmap_page_protect(uobjpage, VM_PROT_NONE);
- if (uobjpage->flags & PG_WANTED)
+ if (uobjpage->pg_flags & PG_WANTED)
wakeup(uobjpage);
/* uobj still locked */
- uobjpage->flags &= ~(PG_WANTED|PG_BUSY);
+ uobjpage->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(uobjpage, NULL);
uvm_lock_pageq();
@@ -1601,14 +1601,14 @@ Case2:
* arg! must unbusy our page and fail or sleep.
*/
if (uobjpage != PGO_DONTCARE) {
- if (uobjpage->flags & PG_WANTED)
+ if (uobjpage->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(uobjpage);
uvm_lock_pageq();
uvm_pageactivate(uobjpage);
uvm_unlock_pageq();
- uobjpage->flags &= ~(PG_BUSY|PG_WANTED);
+ uobjpage->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(uobjpage, NULL);
}
@@ -1653,10 +1653,10 @@ Case2:
* drop handle to uobj as well.
*/
- if (uobjpage->flags & PG_WANTED)
+ if (uobjpage->pg_flags & PG_WANTED)
/* still have the obj lock */
wakeup(uobjpage);
- uobjpage->flags &= ~(PG_BUSY|PG_WANTED);
+ uobjpage->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(uobjpage, NULL);
uvm_lock_pageq();
uvm_pageactivate(uobjpage);
@@ -1709,7 +1709,7 @@ Case2:
* as the map may change while we're asleep.
*/
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg); /* lock still held */
/*
@@ -1717,7 +1717,7 @@ Case2:
* the object lock since the last time we checked.
*/
- pg->flags &= ~(PG_BUSY|PG_FAKE|PG_WANTED);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE|PG_WANTED);
UVM_PAGE_OWN(pg, NULL);
uvmfault_unlockall(&ufi, amap, uobj, NULL);
KASSERT(uvmexp.swpgonly <= uvmexp.swpages);
@@ -1745,7 +1745,7 @@ Case2:
* clear its clean flag now.
*/
- pg->flags &= ~(PG_CLEAN);
+ pg->pg_flags &= ~(PG_CLEAN);
uao_dropswap(uobj, pg->offset >> PAGE_SHIFT);
}
} else {
@@ -1754,7 +1754,7 @@ Case2:
}
uvm_unlock_pageq();
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg); /* lock still held */
/*
@@ -1762,7 +1762,7 @@ Case2:
* lock since the last time we checked.
*/
- pg->flags &= ~(PG_BUSY|PG_FAKE|PG_WANTED);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE|PG_WANTED);
UVM_PAGE_OWN(pg, NULL);
uvmfault_unlockall(&ufi, amap, uobj, NULL);
pmap_update(ufi.orig_map->pmap);
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index cc4fd11af9d..595eb71204b 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.55 2007/03/25 11:31:07 art Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.56 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -332,12 +332,12 @@ uvm_km_pgremove(uobj, start, end)
continue;
UVMHIST_LOG(maphist," page %p, busy=%ld", pp,
- pp->flags & PG_BUSY, 0, 0);
+ pp->pg_flags & PG_BUSY, 0, 0);
/* now do the actual work */
- if (pp->flags & PG_BUSY) {
+ if (pp->pg_flags & PG_BUSY) {
/* owner must check for this when done */
- pp->flags |= PG_RELEASED;
+ pp->pg_flags |= PG_RELEASED;
} else {
/* free the swap slot... */
uao_dropswap(uobj, curoff >> PAGE_SHIFT);
@@ -363,11 +363,11 @@ loop_by_list:
}
UVMHIST_LOG(maphist," page %p, busy=%ld", pp,
- pp->flags & PG_BUSY, 0, 0);
+ pp->pg_flags & PG_BUSY, 0, 0);
- if (pp->flags & PG_BUSY) {
+ if (pp->pg_flags & PG_BUSY) {
/* owner must check for this when done */
- pp->flags |= PG_RELEASED;
+ pp->pg_flags |= PG_RELEASED;
} else {
/* free the swap slot... */
uao_dropswap(uobj, pp->offset >> PAGE_SHIFT);
@@ -425,8 +425,8 @@ uvm_km_pgremove_intrsafe(uobj, start, end)
}
UVMHIST_LOG(maphist," page %p, busy=%ld", pp,
- pp->flags & PG_BUSY, 0, 0);
- KASSERT((pp->flags & PG_BUSY) == 0);
+ pp->pg_flags & PG_BUSY, 0, 0);
+ KASSERT((pp->pg_flags & PG_BUSY) == 0);
KASSERT((pp->pqflags & PQ_ACTIVE) == 0);
KASSERT((pp->pqflags & PQ_INACTIVE) == 0);
uvm_pagefree(pp);
@@ -444,7 +444,7 @@ loop_by_list:
UVMHIST_LOG(maphist," page %p, busy=%ld", pp,
pp->flags & PG_BUSY, 0, 0);
- KASSERT((pp->flags & PG_BUSY) == 0);
+ KASSERT((pp->pg_flags & PG_BUSY) == 0);
KASSERT((pp->pqflags & PQ_ACTIVE) == 0);
KASSERT((pp->pqflags & PQ_INACTIVE) == 0);
uvm_pagefree(pp);
@@ -525,7 +525,7 @@ uvm_km_kmemalloc(map, obj, size, flags)
simple_lock(&obj->vmobjlock);
pg = uvm_pagealloc(obj, offset, NULL, 0);
if (pg) {
- pg->flags &= ~PG_BUSY; /* new page */
+ pg->pg_flags &= ~PG_BUSY; /* new page */
UVM_PAGE_OWN(pg, NULL);
}
simple_unlock(&obj->vmobjlock);
@@ -661,9 +661,9 @@ uvm_km_alloc1(struct vm_map *map, vsize_t size, vsize_t align, boolean_t zeroit)
* released
*/
if (pg) {
- if ((pg->flags & PG_RELEASED) == 0)
+ if ((pg->pg_flags & PG_RELEASED) == 0)
panic("uvm_km_alloc1: non-released page");
- pg->flags |= PG_WANTED;
+ pg->pg_flags |= PG_WANTED;
UVM_UNLOCK_AND_WAIT(pg, &uvm.kernel_object->vmobjlock,
FALSE, "km_alloc", 0);
continue; /* retry */
@@ -672,7 +672,7 @@ uvm_km_alloc1(struct vm_map *map, vsize_t size, vsize_t align, boolean_t zeroit)
/* allocate ram */
pg = uvm_pagealloc(uvm.kernel_object, offset, NULL, 0);
if (pg) {
- pg->flags &= ~PG_BUSY; /* new page */
+ pg->pg_flags &= ~PG_BUSY; /* new page */
UVM_PAGE_OWN(pg, NULL);
}
simple_unlock(&uvm.kernel_object->vmobjlock);
diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c
index 70bc4ed9dc5..c2b5c124e41 100644
--- a/sys/uvm/uvm_loan.c
+++ b/sys/uvm/uvm_loan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_loan.c,v 1.24 2007/03/26 08:43:34 art Exp $ */
+/* $OpenBSD: uvm_loan.c,v 1.25 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */
/*
@@ -485,7 +485,7 @@ uvm_loanuobj(ufi, output, flags, va)
* drop our lock (thus force a lookup refresh/retry).
*/
- if ((pg->flags & PG_RELEASED) != 0 ||
+ if ((pg->pg_flags & PG_RELEASED) != 0 ||
(locked && amap && amap_lookup(&ufi->entry->aref,
ufi->orig_rvaddr - ufi->entry->start))) {
@@ -500,11 +500,11 @@ uvm_loanuobj(ufi, output, flags, va)
if (locked == FALSE) {
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(pg);
- if (pg->flags & PG_RELEASED) {
+ if (pg->pg_flags & PG_RELEASED) {
#ifdef DIAGNOSTIC
if (uobj->pgops->pgo_releasepg == NULL)
panic("uvm_loanuobj: object has no releasepg function");
@@ -518,7 +518,7 @@ uvm_loanuobj(ufi, output, flags, va)
uvm_lock_pageq();
uvm_pageactivate(pg); /* make sure it is in queues */
uvm_unlock_pageq();
- pg->flags &= ~(PG_BUSY|PG_WANTED);
+ pg->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(pg, NULL);
simple_unlock(&uobj->vmobjlock);
return (0);
@@ -540,9 +540,9 @@ uvm_loanuobj(ufi, output, flags, va)
uvm_unlock_pageq();
**output = pg;
*output = (*output) + 1;
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg);
- pg->flags &= ~(PG_WANTED|PG_BUSY);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
return(1); /* got it! */
}
@@ -564,9 +564,9 @@ uvm_loanuobj(ufi, output, flags, va)
uvm_lock_pageq();
uvm_pageactivate(pg); /* reactivate */
uvm_unlock_pageq();
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg);
- pg->flags &= ~(PG_WANTED|PG_BUSY);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
return(1);
}
@@ -577,9 +577,9 @@ uvm_loanuobj(ufi, output, flags, va)
anon = uvm_analloc();
if (anon == NULL) { /* out of VM! */
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg);
- pg->flags &= ~(PG_WANTED|PG_BUSY);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
uvmfault_unlockall(ufi, amap, uobj, NULL);
return(-1);
@@ -594,9 +594,9 @@ uvm_loanuobj(ufi, output, flags, va)
uvm_unlock_pageq();
**output = anon;
*output = (*output) + 1;
- if (pg->flags & PG_WANTED)
+ if (pg->pg_flags & PG_WANTED)
wakeup(pg);
- pg->flags &= ~(PG_WANTED|PG_BUSY);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
return(1);
}
@@ -638,7 +638,7 @@ uvm_loanzero(ufi, output, flags)
}
/* got a zero'd page; return */
- pg->flags &= ~(PG_BUSY|PG_FAKE);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
**output = pg;
*output = (*output) + 1;
@@ -678,7 +678,7 @@ uvm_loanzero(ufi, output, flags)
}
/* got a zero'd page; return */
- pg->flags &= ~(PG_BUSY|PG_FAKE);
+ pg->pg_flags &= ~(PG_BUSY|PG_FAKE);
UVM_PAGE_OWN(pg, NULL);
uvm_lock_pageq();
uvm_pageactivate(pg);
@@ -747,7 +747,7 @@ uvm_unloanpage(ploans, npages)
if (pg->loan_count == 0 && pg->uobject == NULL &&
pg->uanon == NULL) {
- if (pg->flags & PG_BUSY)
+ if (pg->pg_flags & PG_BUSY)
panic("uvm_unloanpage: page %p unowned but PG_BUSY!", pg);
/* be safe */
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 02660579454..55e8ba7b95a 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.85 2007/03/27 16:13:45 art Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.86 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -3770,15 +3770,15 @@ uvm_page_printit(pg, full, pr)
char pqbuf[128];
(*pr)("PAGE %p:\n", pg);
- snprintf(pgbuf, sizeof(pgbuf), "%b", pg->flags, page_flagbits);
+ snprintf(pgbuf, sizeof(pgbuf), "%b", pg->pg_flags, page_flagbits);
snprintf(pqbuf, sizeof(pqbuf), "%b", pg->pqflags, page_pqflagbits);
(*pr)(" flags=%s, pqflags=%s, vers=%d, wire_count=%d, pa=0x%llx\n",
- pgbuf, pqbuf, pg->version, pg->wire_count,
+ pgbuf, pqbuf, pg->pg_version, pg->wire_count,
(long long)pg->phys_addr);
(*pr)(" uobject=%p, uanon=%p, offset=0x%llx loan_count=%d\n",
pg->uobject, pg->uanon, (long long)pg->offset, pg->loan_count);
#if defined(UVM_PAGE_TRKOWN)
- if (pg->flags & PG_BUSY)
+ if (pg->pg_flags & PG_BUSY)
(*pr)(" owning process = %d, tag=%s\n",
pg->owner, pg->owner_tag);
else
@@ -3818,7 +3818,7 @@ uvm_page_printit(pg, full, pr)
/* cross-verify page queue */
if (pg->pqflags & PQ_FREE) {
int fl = uvm_page_lookup_freelist(pg);
- pgl = &uvm.page_free[fl].pgfl_queues[((pg)->flags & PG_ZERO) ?
+ pgl = &uvm.page_free[fl].pgfl_queues[((pg)->pg_flags & PG_ZERO) ?
PGFL_ZEROS : PGFL_UNKNOWN];
} else if (pg->pqflags & PQ_INACTIVE) {
pgl = (pg->pqflags & PQ_SWAPBACKED) ?
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 720a58b7818..c37dd3ca8ab 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.56 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.57 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -151,14 +151,13 @@ static void uvm_pageremove(struct vm_page *);
*/
__inline static void
-uvm_pageinsert(pg)
- struct vm_page *pg;
+uvm_pageinsert(struct vm_page *pg)
{
struct pglist *buck;
int s;
UVMHIST_FUNC("uvm_pageinsert"); UVMHIST_CALLED(pghist);
- KASSERT((pg->flags & PG_TABLED) == 0);
+ KASSERT((pg->pg_flags & PG_TABLED) == 0);
buck = &uvm.page_hash[uvm_pagehash(pg->uobject,pg->offset)];
s = splvm();
simple_lock(&uvm.hashlock);
@@ -167,7 +166,7 @@ uvm_pageinsert(pg)
splx(s);
TAILQ_INSERT_TAIL(&pg->uobject->memq, pg, listq); /* put in object */
- pg->flags |= PG_TABLED;
+ pg->pg_flags |= PG_TABLED;
pg->uobject->uo_npages++;
}
@@ -179,14 +178,13 @@ uvm_pageinsert(pg)
*/
static __inline void
-uvm_pageremove(pg)
- struct vm_page *pg;
+uvm_pageremove(struct vm_page *pg)
{
struct pglist *buck;
int s;
UVMHIST_FUNC("uvm_pageremove"); UVMHIST_CALLED(pghist);
- KASSERT(pg->flags & PG_TABLED);
+ KASSERT(pg->pg_flags & PG_TABLED);
buck = &uvm.page_hash[uvm_pagehash(pg->uobject,pg->offset)];
s = splvm();
simple_lock(&uvm.hashlock);
@@ -203,10 +201,10 @@ uvm_pageremove(pg)
/* object should be locked */
TAILQ_REMOVE(&pg->uobject->memq, pg, listq);
- pg->flags &= ~PG_TABLED;
+ pg->pg_flags &= ~PG_TABLED;
pg->uobject->uo_npages--;
pg->uobject = NULL;
- pg->version++;
+ pg->pg_version++;
}
/*
@@ -1017,7 +1015,7 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list)
uvmexp.free--;
/* update zero'd page count */
- if (pg->flags & PG_ZERO)
+ if (pg->pg_flags & PG_ZERO)
uvmexp.zeropages--;
/*
@@ -1025,7 +1023,7 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list)
* zero the page
*/
if (flags & UVM_PGA_ZERO) {
- if (pg->flags & PG_ZERO) {
+ if (pg->pg_flags & PG_ZERO) {
uvmexp.pga_zerohit++;
zeroit = 0;
} else {
@@ -1039,8 +1037,8 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list)
pg->offset = off;
pg->uobject = obj;
pg->uanon = anon;
- pg->flags = PG_BUSY|PG_CLEAN|PG_FAKE;
- pg->version++;
+ pg->pg_flags = PG_BUSY|PG_CLEAN|PG_FAKE;
+ pg->pg_version++;
if (anon) {
anon->u.an_page = pg;
pg->pqflags = PQ_ANON;
@@ -1062,7 +1060,7 @@ uvm_pagealloc_strat(obj, off, anon, flags, strat, free_list)
* A zero'd page is not clean. If we got a page not already
* zero'd, then we have to zero it ourselves.
*/
- pg->flags &= ~PG_CLEAN;
+ pg->pg_flags &= ~PG_CLEAN;
if (zeroit)
pmap_zero_page(pg);
}
@@ -1107,7 +1105,7 @@ uvm_pagerealloc(pg, newobj, newoff)
if (newobj) {
pg->uobject = newobj;
pg->offset = newoff;
- pg->version++;
+ pg->pg_version++;
uvm_pageinsert(pg);
}
}
@@ -1146,7 +1144,7 @@ uvm_pagefree(pg)
* from the object.
*/
- if (pg->flags & PG_TABLED) {
+ if (pg->pg_flags & PG_TABLED) {
/*
* if the object page is on loan we are going to drop ownership.
@@ -1157,7 +1155,7 @@ uvm_pagefree(pg)
*/
if (saved_loan_count)
- pg->flags &= ~PG_CLEAN; /* in case an anon takes over */
+ pg->pg_flags &= ~PG_CLEAN;/* in case an anon takes over */
uvm_pageremove(pg);
/*
@@ -1172,7 +1170,6 @@ uvm_pagefree(pg)
if (saved_loan_count)
return;
} else if (saved_loan_count && (pg->pqflags & PQ_ANON)) {
-
/*
* if our page is owned by an anon and is loaned out to the
* kernel then we just want to drop ownership and return.
@@ -1223,7 +1220,7 @@ uvm_pagefree(pg)
* and put on free queue
*/
- pg->flags &= ~PG_ZERO;
+ pg->pg_flags &= ~PG_ZERO;
s = uvm_lock_fpageq();
TAILQ_INSERT_TAIL(&uvm.page_free[
@@ -1266,22 +1263,22 @@ uvm_page_unbusy(pgs, npgs)
if (pg == NULL || pg == PGO_DONTCARE) {
continue;
}
- if (pg->flags & PG_WANTED) {
+ if (pg->pg_flags & PG_WANTED) {
wakeup(pg);
}
- if (pg->flags & PG_RELEASED) {
+ if (pg->pg_flags & PG_RELEASED) {
UVMHIST_LOG(pdhist, "releasing pg %p", pg,0,0,0);
uobj = pg->uobject;
if (uobj != NULL) {
uobj->pgops->pgo_releasepg(pg, NULL);
} else {
- pg->flags &= ~(PG_BUSY);
+ pg->pg_flags &= ~(PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
uvm_anfree(pg->uanon);
}
} else {
UVMHIST_LOG(pdhist, "unbusying pg %p", pg,0,0,0);
- pg->flags &= ~(PG_WANTED|PG_BUSY);
+ pg->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(pg, NULL);
}
}
@@ -1394,7 +1391,7 @@ uvm_pageidlezero()
*/
pmap_zero_page(pg);
#endif
- pg->flags |= PG_ZERO;
+ pg->pg_flags |= PG_ZERO;
s = uvm_lock_fpageq();
TAILQ_INSERT_HEAD(&pgfl->pgfl_queues[PGFL_ZEROS], pg, pageq);
diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h
index 4419c861e8c..9cce3418574 100644
--- a/sys/uvm/uvm_page.h
+++ b/sys/uvm/uvm_page.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.h,v 1.22 2006/06/16 23:05:23 miod Exp $ */
+/* $OpenBSD: uvm_page.h,v 1.23 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_page.h,v 1.19 2000/12/28 08:24:55 chs Exp $ */
/*
@@ -128,8 +128,8 @@ struct vm_page {
struct uvm_object *uobject; /* object (O,P) */
voff_t offset; /* offset into object (O,P) */
- u_short flags; /* object flags [O] */
- u_short version; /* version count [O] */
+ u_short pg_flags; /* object flags [O] */
+ u_short pg_version; /* version count [O] */
u_short wire_count; /* wired down map refs [P] */
u_short pqflags; /* page queue flags [P] */
u_int loan_count; /* number of active loans
diff --git a/sys/uvm/uvm_page_i.h b/sys/uvm/uvm_page_i.h
index e918ec560d4..d9df6e18754 100644
--- a/sys/uvm/uvm_page_i.h
+++ b/sys/uvm/uvm_page_i.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page_i.h,v 1.15 2002/09/10 18:29:44 art Exp $ */
+/* $OpenBSD: uvm_page_i.h,v 1.16 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_page_i.h,v 1.14 2000/11/27 07:47:42 chs Exp $ */
/*
@@ -89,7 +89,7 @@
*/
PAGE_INLINE int
-uvm_lock_fpageq()
+uvm_lock_fpageq(void)
{
int s;
@@ -106,8 +106,7 @@ uvm_lock_fpageq()
*/
PAGE_INLINE void
-uvm_unlock_fpageq(s)
- int s;
+uvm_unlock_fpageq(int s)
{
simple_unlock(&uvm.fpageqlock);
@@ -122,9 +121,7 @@ uvm_unlock_fpageq(s)
*/
struct vm_page *
-uvm_pagelookup(obj, off)
- struct uvm_object *obj;
- voff_t off;
+uvm_pagelookup(struct uvm_object *obj, voff_t off)
{
struct vm_page *pg;
struct pglist *buck;
@@ -151,8 +148,7 @@ uvm_pagelookup(obj, off)
*/
PAGE_INLINE void
-uvm_pagewire(pg)
- struct vm_page *pg;
+uvm_pagewire(struct vm_page *pg)
{
if (pg->wire_count == 0) {
if (pg->pqflags & PQ_ACTIVE) {
@@ -181,8 +177,7 @@ uvm_pagewire(pg)
*/
PAGE_INLINE void
-uvm_pageunwire(pg)
- struct vm_page *pg;
+uvm_pageunwire(struct vm_page *pg)
{
pg->wire_count--;
if (pg->wire_count == 0) {
@@ -202,8 +197,7 @@ uvm_pageunwire(pg)
*/
PAGE_INLINE void
-uvm_pagedeactivate(pg)
- struct vm_page *pg;
+uvm_pagedeactivate(struct vm_page *pg)
{
if (pg->pqflags & PQ_ACTIVE) {
TAILQ_REMOVE(&uvm.page_active, pg, pageq);
@@ -227,9 +221,9 @@ uvm_pagedeactivate(pg)
* re-sync it after we zap all mappings when
* scanning the inactive list.
*/
- if ((pg->flags & PG_CLEAN) != 0 &&
+ if ((pg->pg_flags & PG_CLEAN) != 0 &&
pmap_is_modified(pg))
- pg->flags &= ~PG_CLEAN;
+ pg->pg_flags &= ~PG_CLEAN;
}
}
@@ -240,8 +234,7 @@ uvm_pagedeactivate(pg)
*/
PAGE_INLINE void
-uvm_pageactivate(pg)
- struct vm_page *pg;
+uvm_pageactivate(struct vm_page *pg)
{
if (pg->pqflags & PQ_INACTIVE) {
if (pg->pqflags & PQ_SWAPBACKED)
@@ -277,11 +270,9 @@ uvm_pageactivate(pg)
*/
PAGE_INLINE void
-uvm_pagezero(pg)
- struct vm_page *pg;
+uvm_pagezero(struct vm_page *pg)
{
-
- pg->flags &= ~PG_CLEAN;
+ pg->pg_flags &= ~PG_CLEAN;
pmap_zero_page(pg);
}
@@ -293,11 +284,9 @@ uvm_pagezero(pg)
*/
PAGE_INLINE void
-uvm_pagecopy(src, dst)
- struct vm_page *src, *dst;
+uvm_pagecopy(struct vm_page *src, struct vm_page *dst)
{
-
- dst->flags &= ~PG_CLEAN;
+ dst->pg_flags &= ~PG_CLEAN;
pmap_copy_page(src, dst);
}
@@ -306,8 +295,7 @@ uvm_pagecopy(src, dst)
*/
PAGE_INLINE int
-uvm_page_lookup_freelist(pg)
- struct vm_page *pg;
+uvm_page_lookup_freelist(struct vm_page *pg)
{
int lcv;
diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c
index 6be1789b083..d2ac89225a7 100644
--- a/sys/uvm/uvm_pager.c
+++ b/sys/uvm/uvm_pager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pager.c,v 1.40 2007/03/25 11:31:07 art Exp $ */
+/* $OpenBSD: uvm_pager.c,v 1.41 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */
/*
@@ -172,7 +172,7 @@ enter:
for (cva = kva ; size != 0 ; size -= PAGE_SIZE, cva += PAGE_SIZE) {
pp = *pps++;
KASSERT(pp);
- KASSERT(pp->flags & PG_BUSY);
+ KASSERT(pp->pg_flags & PG_BUSY);
pmap_enter(vm_map_pmap(pager_map), cva, VM_PAGE_TO_PHYS(pp),
prot, PMAP_WIRED | prot);
}
@@ -330,23 +330,23 @@ uvm_mk_pcluster(uobj, pps, npages, center, flags, mlo, mhi)
}
/* make sure "clean" bit is sync'd */
- if ((pclust->flags & PG_CLEANCHK) == 0) {
- if ((pclust->flags & (PG_CLEAN|PG_BUSY))
+ if ((pclust->pg_flags & PG_CLEANCHK) == 0) {
+ if ((pclust->pg_flags & (PG_CLEAN|PG_BUSY))
== PG_CLEAN &&
pmap_is_modified(pclust))
- pclust->flags &= ~PG_CLEAN;
+ pclust->pg_flags &= ~PG_CLEAN;
/* now checked */
- pclust->flags |= PG_CLEANCHK;
+ pclust->pg_flags |= PG_CLEANCHK;
}
}
/* is page available for cleaning and does it need it */
- if ((pclust->flags & (PG_CLEAN|PG_BUSY)) != 0) {
+ if ((pclust->pg_flags & (PG_CLEAN|PG_BUSY)) != 0) {
break; /* page is already clean or is busy */
}
/* yes! enroll the page in our array */
- pclust->flags |= PG_BUSY; /* busy! */
+ pclust->pg_flags |= PG_BUSY; /* busy! */
UVM_PAGE_OWN(pclust, "uvm_mk_pcluster");
/* XXX: protect wired page? see above comment. */
@@ -651,17 +651,17 @@ uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags)
}
/* did someone want the page while we had it busy-locked? */
- if (ppsp[lcv]->flags & PG_WANTED) {
+ if (ppsp[lcv]->pg_flags & PG_WANTED) {
/* still holding obj lock */
wakeup(ppsp[lcv]);
}
/* if page was released, release it. otherwise un-busy it */
- if (ppsp[lcv]->flags & PG_RELEASED) {
+ if (ppsp[lcv]->pg_flags & PG_RELEASED) {
if (ppsp[lcv]->pqflags & PQ_ANON) {
/* so that anfree will free */
- ppsp[lcv]->flags &= ~(PG_BUSY);
+ ppsp[lcv]->pg_flags &= ~(PG_BUSY);
UVM_PAGE_OWN(ppsp[lcv], NULL);
pmap_page_protect(ppsp[lcv], VM_PROT_NONE);
@@ -697,7 +697,7 @@ uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags)
continue; /* next page */
} else {
- ppsp[lcv]->flags &= ~(PG_BUSY|PG_WANTED|PG_FAKE);
+ ppsp[lcv]->pg_flags &= ~(PG_BUSY|PG_WANTED|PG_FAKE);
UVM_PAGE_OWN(ppsp[lcv], NULL);
}
@@ -708,7 +708,7 @@ uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags)
if (flags & PGO_PDFREECLUST) {
pmap_clear_reference(ppsp[lcv]);
pmap_clear_modify(ppsp[lcv]);
- ppsp[lcv]->flags |= PG_CLEAN;
+ ppsp[lcv]->pg_flags |= PG_CLEAN;
}
/* if anonymous cluster, unlock object and move on */
@@ -839,10 +839,10 @@ uvm_aio_aiodone(bp)
*/
if (!write && error) {
- pg->flags |= PG_RELEASED;
+ pg->pg_flags |= PG_RELEASED;
continue;
}
- KASSERT(!write || (pgs[i]->flags & PG_FAKE) == 0);
+ KASSERT(!write || (pgs[i]->pg_flags & PG_FAKE) == 0);
/*
* if this is a read and the page is PG_FAKE,
@@ -850,11 +850,11 @@ uvm_aio_aiodone(bp)
* mark the page PG_CLEAN and not PG_FAKE.
*/
- if ((pgs[i]->flags & PG_FAKE) || (write && error != ENOMEM)) {
+ if ((pgs[i]->pg_flags & PG_FAKE) || (write && error != ENOMEM)) {
pmap_clear_reference(pgs[i]);
pmap_clear_modify(pgs[i]);
- pgs[i]->flags |= PG_CLEAN;
- pgs[i]->flags &= ~PG_FAKE;
+ pgs[i]->pg_flags |= PG_CLEAN;
+ pgs[i]->pg_flags &= ~PG_FAKE;
}
if (swap) {
if (pg->pqflags & PQ_ANON) {
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index 2bb5ad5e4be..0ca61319c31 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pdaemon.c,v 1.30 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_pdaemon.c,v 1.31 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */
/*
@@ -492,7 +492,7 @@ uvmpd_scan_inactive(pglst)
p->pqflags |= PQ_ANON;
/* anon now owns it */
}
- if (p->flags & PG_BUSY) {
+ if (p->pg_flags & PG_BUSY) {
simple_unlock(&anon->an_lock);
uvmexp.pdbusy++;
/* someone else owns page, skip it */
@@ -506,7 +506,7 @@ uvmpd_scan_inactive(pglst)
/* lock failed, skip this page */
continue;
}
- if (p->flags & PG_BUSY) {
+ if (p->pg_flags & PG_BUSY) {
simple_unlock(&uobj->vmobjlock);
uvmexp.pdbusy++;
/* someone else owns page, skip it */
@@ -521,7 +521,7 @@ uvmpd_scan_inactive(pglst)
* can free it now and continue.
*/
- if (p->flags & PG_CLEAN) {
+ if (p->pg_flags & PG_CLEAN) {
if (p->pqflags & PQ_SWAPBACKED) {
/* this page now lives only in swap */
simple_lock(&uvm.swap_data_lock);
@@ -619,7 +619,7 @@ uvmpd_scan_inactive(pglst)
*/
swap_backed = ((p->pqflags & PQ_SWAPBACKED) != 0);
- p->flags |= PG_BUSY; /* now we own it */
+ p->pg_flags |= PG_BUSY; /* now we own it */
UVM_PAGE_OWN(p, "scan_inactive");
pmap_page_protect(p, VM_PROT_READ);
uvmexp.pgswapout++;
@@ -656,7 +656,7 @@ uvmpd_scan_inactive(pglst)
TRUE);
if (swslot == 0) {
/* no swap? give up! */
- p->flags &= ~PG_BUSY;
+ p->pg_flags &= ~PG_BUSY;
UVM_PAGE_OWN(p, NULL);
if (anon)
simple_unlock(
@@ -846,15 +846,15 @@ uvmpd_scan_inactive(pglst)
#endif
/* handle PG_WANTED now */
- if (p->flags & PG_WANTED)
+ if (p->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(p);
- p->flags &= ~(PG_BUSY|PG_WANTED);
+ p->pg_flags &= ~(PG_BUSY|PG_WANTED);
UVM_PAGE_OWN(p, NULL);
/* released during I/O? */
- if (p->flags & PG_RELEASED) {
+ if (p->pg_flags & PG_RELEASED) {
if (anon) {
/* remove page so we can get nextpg */
anon->u.an_page = NULL;
@@ -903,7 +903,7 @@ uvmpd_scan_inactive(pglst)
/* pageout was a success... */
pmap_clear_reference(p);
pmap_clear_modify(p);
- p->flags |= PG_CLEAN;
+ p->pg_flags |= PG_CLEAN;
}
}
@@ -1035,7 +1035,7 @@ uvmpd_scan()
p != NULL && (inactive_shortage > 0 || swap_shortage > 0);
p = nextpg) {
nextpg = TAILQ_NEXT(p, pageq);
- if (p->flags & PG_BUSY)
+ if (p->pg_flags & PG_BUSY)
continue; /* quick check before trying to lock */
/*
@@ -1062,7 +1062,7 @@ uvmpd_scan()
* skip this page if it's busy.
*/
- if ((p->flags & PG_BUSY) != 0) {
+ if ((p->pg_flags & PG_BUSY) != 0) {
if (p->pqflags & PQ_ANON)
simple_unlock(&p->uanon->an_lock);
else
@@ -1079,7 +1079,7 @@ uvmpd_scan()
if ((p->pqflags & PQ_ANON) && p->uanon->an_swslot) {
uvm_swap_free(p->uanon->an_swslot, 1);
p->uanon->an_swslot = 0;
- p->flags &= ~PG_CLEAN;
+ p->pg_flags &= ~PG_CLEAN;
swap_shortage--;
}
if (p->pqflags & PQ_AOBJ) {
@@ -1087,7 +1087,7 @@ uvmpd_scan()
p->offset >> PAGE_SHIFT, 0);
if (slot) {
uvm_swap_free(slot, 1);
- p->flags &= ~PG_CLEAN;
+ p->pg_flags &= ~PG_CLEAN;
swap_shortage--;
}
}
diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c
index 2a6aa83efa9..f69e89b3e2b 100644
--- a/sys/uvm/uvm_pglist.c
+++ b/sys/uvm/uvm_pglist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pglist.c,v 1.18 2007/02/12 11:43:47 tom Exp $ */
+/* $OpenBSD: uvm_pglist.c,v 1.19 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $ */
/*-
@@ -105,7 +105,7 @@ uvm_pglistalloc_simple(psize_t size, paddr_t low, paddr_t high,
continue;
free_list = uvm_page_lookup_freelist(pg);
- pgflidx = (pg->flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN;
+ pgflidx = (pg->pg_flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN;
#ifdef DEBUG
for (tp = TAILQ_FIRST(&uvm.page_free[free_list].pgfl_queues[pgflidx]);
tp != NULL;
@@ -118,13 +118,13 @@ uvm_pglistalloc_simple(psize_t size, paddr_t low, paddr_t high,
#endif
TAILQ_REMOVE(&uvm.page_free[free_list].pgfl_queues[pgflidx], pg, pageq);
uvmexp.free--;
- if (pg->flags & PG_ZERO)
+ if (pg->pg_flags & PG_ZERO)
uvmexp.zeropages--;
- pg->flags = PG_CLEAN;
+ pg->pg_flags = PG_CLEAN;
pg->pqflags = 0;
pg->uobject = NULL;
pg->uanon = NULL;
- pg->version++;
+ pg->pg_version++;
TAILQ_INSERT_TAIL(rlist, pg, pageq);
STAT_INCR(uvm_pglistalloc_npages);
if (--todo == 0) {
@@ -296,7 +296,7 @@ uvm_pglistalloc(size, low, high, alignment, boundary, rlist, nsegs, waitok)
while (idx < end) {
m = &pgs[idx];
free_list = uvm_page_lookup_freelist(m);
- pgflidx = (m->flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN;
+ pgflidx = (m->pg_flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN;
#ifdef DEBUG
for (tp = TAILQ_FIRST(&uvm.page_free[
free_list].pgfl_queues[pgflidx]);
@@ -311,13 +311,13 @@ uvm_pglistalloc(size, low, high, alignment, boundary, rlist, nsegs, waitok)
TAILQ_REMOVE(&uvm.page_free[free_list].pgfl_queues[pgflidx],
m, pageq);
uvmexp.free--;
- if (m->flags & PG_ZERO)
+ if (m->pg_flags & PG_ZERO)
uvmexp.zeropages--;
- m->flags = PG_CLEAN;
+ m->pg_flags = PG_CLEAN;
m->pqflags = 0;
m->uobject = NULL;
m->uanon = NULL;
- m->version++;
+ m->pg_version++;
TAILQ_INSERT_TAIL(rlist, m, pageq);
idx++;
STAT_INCR(uvm_pglistalloc_npages);
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 73131993ebd..6a8c17d7bfc 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.44 2007/03/25 13:14:41 pedro Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.45 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
@@ -592,7 +592,7 @@ uvm_vnp_terminate(vp)
#ifdef DEBUG
struct vm_page *pp;
TAILQ_FOREACH(pp, &uvn->u_obj.memq, listq) {
- if ((pp->flags & PG_BUSY) == 0)
+ if ((pp->pg_flags & PG_BUSY) == 0)
panic("uvm_vnp_terminate: detected unbusy pg");
}
if (uvn->u_nio == 0)
@@ -676,7 +676,7 @@ uvn_releasepg(pg, nextpgp)
{
struct uvm_vnode *uvn = (struct uvm_vnode *) pg->uobject;
#ifdef DIAGNOSTIC
- if ((pg->flags & PG_RELEASED) == 0)
+ if ((pg->pg_flags & PG_RELEASED) == 0)
panic("uvn_releasepg: page not released!");
#endif
@@ -873,7 +873,7 @@ uvn_flush(uobj, start, stop, flags)
if (!all &&
(pp->offset < start || pp->offset >= stop))
continue;
- pp->flags &= ~PG_CLEANCHK;
+ pp->pg_flags &= ~PG_CLEANCHK;
}
} else { /* by hash */
@@ -881,7 +881,7 @@ uvn_flush(uobj, start, stop, flags)
curoff += PAGE_SIZE) {
pp = uvm_pagelookup(uobj, curoff);
if (pp)
- pp->flags &= ~PG_CLEANCHK;
+ pp->pg_flags &= ~PG_CLEANCHK;
}
}
}
@@ -945,9 +945,9 @@ uvn_flush(uobj, start, stop, flags)
* confuse pagedaemon).
*/
- if ((flags & PGO_CLEANIT) == 0 || (pp->flags & PG_BUSY) != 0) {
+ if ((flags & PGO_CLEANIT) == 0 || (pp->pg_flags & PG_BUSY) != 0) {
needs_clean = FALSE;
- if ((pp->flags & PG_BUSY) != 0 &&
+ if ((pp->pg_flags & PG_BUSY) != 0 &&
(flags & (PGO_CLEANIT|PGO_SYNCIO)) ==
(PGO_CLEANIT|PGO_SYNCIO))
need_iosync = TRUE;
@@ -956,16 +956,16 @@ uvn_flush(uobj, start, stop, flags)
* freeing: nuke all mappings so we can sync
* PG_CLEAN bit with no race
*/
- if ((pp->flags & PG_CLEAN) != 0 &&
+ if ((pp->pg_flags & PG_CLEAN) != 0 &&
(flags & PGO_FREE) != 0 &&
(pp->pqflags & PQ_ACTIVE) != 0)
pmap_page_protect(pp, VM_PROT_NONE);
- if ((pp->flags & PG_CLEAN) != 0 &&
+ if ((pp->pg_flags & PG_CLEAN) != 0 &&
pmap_is_modified(pp))
- pp->flags &= ~(PG_CLEAN);
- pp->flags |= PG_CLEANCHK; /* update "hint" */
+ pp->pg_flags &= ~(PG_CLEAN);
+ pp->pg_flags |= PG_CLEANCHK; /* update "hint" */
- needs_clean = ((pp->flags & PG_CLEAN) == 0);
+ needs_clean = ((pp->pg_flags & PG_CLEAN) == 0);
}
/*
@@ -989,9 +989,9 @@ uvn_flush(uobj, start, stop, flags)
}
} else if (flags & PGO_FREE) {
- if (pp->flags & PG_BUSY) {
+ if (pp->pg_flags & PG_BUSY) {
/* release busy pages */
- pp->flags |= PG_RELEASED;
+ pp->pg_flags |= PG_RELEASED;
} else {
pmap_page_protect(pp, VM_PROT_NONE);
/* removed page from object */
@@ -1011,10 +1011,10 @@ uvn_flush(uobj, start, stop, flags)
* note: locked: uobj and page queues.
*/
- pp->flags |= PG_BUSY; /* we 'own' page now */
+ pp->pg_flags |= PG_BUSY; /* we 'own' page now */
UVM_PAGE_OWN(pp, "uvn_flush");
pmap_page_protect(pp, VM_PROT_READ);
- pp_version = pp->version;
+ pp_version = pp->pg_version;
ReTry:
ppsp = pps;
npages = sizeof(pps) / sizeof(struct vm_page *);
@@ -1078,7 +1078,7 @@ ReTry:
* no per-page ops: refresh ppnext and continue
*/
if (by_list) {
- if (pp->version == pp_version)
+ if (pp->pg_version == pp_version)
ppnext = TAILQ_NEXT(pp, listq);
else
/* reset */
@@ -1117,7 +1117,7 @@ ReTry:
/* set up next page for outer loop */
if (by_list) {
- if (pp->version == pp_version)
+ if (pp->pg_version == pp_version)
ppnext = TAILQ_NEXT(pp, listq);
else
/* reset */
@@ -1143,13 +1143,13 @@ ReTry:
*/
if (result != VM_PAGER_PEND) {
- if (ptmp->flags & PG_WANTED)
+ if (ptmp->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(ptmp);
- ptmp->flags &= ~(PG_WANTED|PG_BUSY);
+ ptmp->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(ptmp, NULL);
- if (ptmp->flags & PG_RELEASED) {
+ if (ptmp->pg_flags & PG_RELEASED) {
/* pgo_releasepg wants this */
uvm_unlock_pageq();
@@ -1160,7 +1160,7 @@ ReTry:
continue; /* next page */
} else {
- ptmp->flags |= (PG_CLEAN|PG_CLEANCHK);
+ ptmp->pg_flags |= (PG_CLEAN|PG_CLEANCHK);
if ((flags & PGO_FREE) == 0)
pmap_clear_modify(ptmp);
}
@@ -1179,9 +1179,9 @@ ReTry:
} else if (flags & PGO_FREE) {
if (result == VM_PAGER_PEND) {
- if ((ptmp->flags & PG_BUSY) != 0)
+ if ((ptmp->pg_flags & PG_BUSY) != 0)
/* signal for i/o done */
- ptmp->flags |= PG_RELEASED;
+ ptmp->pg_flags |= PG_RELEASED;
} else {
if (result != VM_PAGER_OK) {
printf("uvn_flush: obj=%p, "
@@ -1349,7 +1349,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
/* to be useful must get a non-busy, non-released pg */
if (ptmp == NULL ||
- (ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ (ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
if (lcv == centeridx || (flags & PGO_ALLPAGES)
!= 0)
done = FALSE; /* need to do a wait or I/O! */
@@ -1360,7 +1360,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* useful page: busy/lock it and plug it in our
* result array
*/
- ptmp->flags |= PG_BUSY; /* loan up to caller */
+ ptmp->pg_flags |= PG_BUSY; /* loan up to caller */
UVM_PAGE_OWN(ptmp, "uvn_get1");
pps[lcv] = ptmp;
gotpages++;
@@ -1455,8 +1455,8 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
}
/* page is there, see if we need to wait on it */
- if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
- ptmp->flags |= PG_WANTED;
+ if ((ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ ptmp->pg_flags |= PG_WANTED;
UVM_UNLOCK_AND_WAIT(ptmp,
&uobj->vmobjlock, FALSE, "uvn_get",0);
simple_lock(&uobj->vmobjlock);
@@ -1469,7 +1469,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* now (so we own it) and set pps[lcv] (so that we
* exit the while loop).
*/
- ptmp->flags |= PG_BUSY;
+ ptmp->pg_flags |= PG_BUSY;
UVM_PAGE_OWN(ptmp, "uvn_get2");
pps[lcv] = ptmp;
}
@@ -1501,11 +1501,11 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
/* lock object. check for errors. */
simple_lock(&uobj->vmobjlock);
if (result != VM_PAGER_OK) {
- if (ptmp->flags & PG_WANTED)
+ if (ptmp->pg_flags & PG_WANTED)
/* object lock still held */
wakeup(ptmp);
- ptmp->flags &= ~(PG_WANTED|PG_BUSY);
+ ptmp->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(ptmp, NULL);
uvm_lock_pageq();
uvm_pagefree(ptmp);
@@ -1525,7 +1525,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* => activate the page
*/
- ptmp->flags &= ~PG_FAKE; /* data is valid ... */
+ ptmp->pg_flags &= ~PG_FAKE; /* data is valid ... */
pmap_clear_modify(ptmp); /* ... and clean */
pps[lcv] = ptmp;