PG_SLAB no longer serves a useful purpose, since m->object is no

longer abused to store pointer to slab. Remove it.

Reviewed by:    alc
Sponsored by:   The FreeBSD Foundation
Approved by:	re (hrs)
This commit is contained in:
Konstantin Belousov 2013-09-17 07:35:26 +00:00
parent 85fdd534cf
commit 9eab548476
4 changed files with 4 additions and 15 deletions

View File

@ -404,15 +404,9 @@ static __inline uma_slab_t
vtoslab(vm_offset_t va)
{
vm_page_t p;
uma_slab_t slab;
p = PHYS_TO_VM_PAGE(pmap_kextract(va));
slab = (uma_slab_t )p->plinks.s.pv;
if (p->flags & PG_SLAB)
return (slab);
else
return (NULL);
return ((uma_slab_t)p->plinks.s.pv);
}
static __inline void
@ -422,7 +416,6 @@ vsetslab(vm_offset_t va, uma_slab_t slab)
p = PHYS_TO_VM_PAGE(pmap_kextract(va));
p->plinks.s.pv = slab;
p->flags |= PG_SLAB;
}
/*

View File

@ -968,8 +968,7 @@ vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex,
KASSERT(m->object == NULL,
("vm_page_insert_after: page already inserted"));
if (mpred != NULL) {
KASSERT(mpred->object == object ||
(mpred->flags & PG_SLAB) != 0,
KASSERT(mpred->object == object,
("vm_page_insert_after: object doesn't contain mpred"));
KASSERT(mpred->pindex < pindex,
("vm_page_insert_after: mpred doesn't precede pindex"));
@ -1019,8 +1018,7 @@ vm_page_insert_radixdone(vm_page_t m, vm_object_t object, vm_page_t mpred)
KASSERT(object != NULL && m->object == object,
("vm_page_insert_radixdone: page %p has inconsistent object", m));
if (mpred != NULL) {
KASSERT(mpred->object == object ||
(mpred->flags & PG_SLAB) != 0,
KASSERT(mpred->object == object,
("vm_page_insert_after: object doesn't contain mpred"));
KASSERT(mpred->pindex < m->pindex,
("vm_page_insert_after: mpred doesn't precede pindex"));

View File

@ -325,7 +325,6 @@ extern struct mtx_padalign pa_lock[];
#define PG_FICTITIOUS 0x0004 /* physical page doesn't exist */
#define PG_ZERO 0x0008 /* page is zeroed */
#define PG_MARKER 0x0010 /* special queue marker page */
#define PG_SLAB 0x0020 /* object pointer is actually a slab */
#define PG_WINATCFLS 0x0040 /* flush dirty page on inactive q */
#define PG_NODUMP 0x0080 /* don't include this page in a dump */
#define PG_UNHOLDFREE 0x0100 /* delayed free of a held page */

View File

@ -502,8 +502,7 @@ vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex, vm_page_t mpred)
* Look for an existing reservation.
*/
if (mpred != NULL) {
KASSERT(mpred->object == object ||
(mpred->flags & PG_SLAB) != 0,
KASSERT(mpred->object == object,
("vm_reserv_alloc_page: object doesn't contain mpred"));
KASSERT(mpred->pindex < pindex,
("vm_reserv_alloc_page: mpred doesn't precede pindex"));