summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_kern.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-08-09 21:01:36 +0000
committerkib <kib@FreeBSD.org>2011-08-09 21:01:36 +0000
commitf408aa11a3c5eee2273216823e5ccb3bbcb98d4c (patch)
tree570d750da32cd7ade17317435d427a47d947779a /sys/vm/vm_kern.c
parentbceb19a351c4e3c01b16f29e3c6856629159df2e (diff)
downloadFreeBSD-src-f408aa11a3c5eee2273216823e5ccb3bbcb98d4c.zip
FreeBSD-src-f408aa11a3c5eee2273216823e5ccb3bbcb98d4c.tar.gz
- Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flag
to VPO_UNMANAGED (and also making the flag protected by the vm object lock, instead of vm page queue lock). - Mark the fake pages with both PG_FICTITIOUS (as it is now) and VPO_UNMANAGED. As a consequence, pmap code now can use use just VPO_UNMANAGED to decide whether the page is unmanaged. Reviewed by: alc Tested by: pho (x86, previous version), marius (sparc64), marcel (arm, ia64, powerpc), ray (mips) Sponsored by: The FreeBSD Foundation Approved by: re (bz)
Diffstat (limited to 'sys/vm/vm_kern.c')
-rw-r--r--sys/vm/vm_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 23884af..24c2448 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -210,7 +210,7 @@ kmem_alloc(map, size)
mem = vm_page_grab(kernel_object, OFF_TO_IDX(offset + i),
VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
mem->valid = VM_PAGE_BITS_ALL;
- KASSERT((mem->flags & PG_UNMANAGED) != 0,
+ KASSERT((mem->oflags & VPO_UNMANAGED) != 0,
("kmem_alloc: page %p is managed", mem));
}
VM_OBJECT_UNLOCK(kernel_object);
@@ -428,7 +428,7 @@ retry:
if (flags & M_ZERO && (m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
m->valid = VM_PAGE_BITS_ALL;
- KASSERT((m->flags & PG_UNMANAGED) != 0,
+ KASSERT((m->oflags & VPO_UNMANAGED) != 0,
("kmem_malloc: page %p is managed", m));
}
VM_OBJECT_UNLOCK(kmem_object);
OpenPOWER on IntegriCloud