Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2013 07:35:27 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255626 - head/sys/vm
Message-ID:  <201309170735.r8H7ZRDD056968@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Sep 17 07:35:26 2013
New Revision: 255626
URL: http://svnweb.freebsd.org/changeset/base/255626

Log:
  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)

Modified:
  head/sys/vm/uma_int.h
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h
  head/sys/vm/vm_reserv.c

Modified: head/sys/vm/uma_int.h
==============================================================================
--- head/sys/vm/uma_int.h	Tue Sep 17 06:37:21 2013	(r255625)
+++ head/sys/vm/uma_int.h	Tue Sep 17 07:35:26 2013	(r255626)
@@ -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;
 }
 
 /*

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Tue Sep 17 06:37:21 2013	(r255625)
+++ head/sys/vm/vm_page.c	Tue Sep 17 07:35:26 2013	(r255626)
@@ -968,8 +968,7 @@ vm_page_insert_after(vm_page_t m, vm_obj
 	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
 	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"));

Modified: head/sys/vm/vm_page.h
==============================================================================
--- head/sys/vm/vm_page.h	Tue Sep 17 06:37:21 2013	(r255625)
+++ head/sys/vm/vm_page.h	Tue Sep 17 07:35:26 2013	(r255626)
@@ -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 */

Modified: head/sys/vm/vm_reserv.c
==============================================================================
--- head/sys/vm/vm_reserv.c	Tue Sep 17 06:37:21 2013	(r255625)
+++ head/sys/vm/vm_reserv.c	Tue Sep 17 07:35:26 2013	(r255626)
@@ -502,8 +502,7 @@ vm_reserv_alloc_page(vm_object_t object,
 	 * 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"));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309170735.r8H7ZRDD056968>