Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2009 15:29:03 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 156687 for review
Message-ID:  <200901261529.n0QFT3ca034388@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=156687

Change 156687 by jhb@jhb_jhbbsd on 2009/01/26 15:28:50

	Drop these changes.

Affected files ...

.. //depot/projects/smpng/sys/vm/uma_core.c#76 edit
.. //depot/projects/smpng/sys/vm/uma_int.h#33 edit

Differences ...

==== //depot/projects/smpng/sys/vm/uma_core.c#76 (text+ko) ====

@@ -1308,7 +1308,10 @@
 	/*
 	 * Initialize keg's lock (shared among zones).
 	 */
-	KEG_LOCK_INIT(keg, arg->flags & UMA_ZONE_MTXCLASS);
+	if (arg->flags & UMA_ZONE_MTXCLASS)
+		KEG_LOCK_INIT(keg, 1);
+	else
+		KEG_LOCK_INIT(keg, 0);
 
 	/*
 	 * If we're putting the slab header in the actual page we need to
@@ -1403,6 +1406,7 @@
 		KASSERT(arg->keg != NULL, ("Secondary zone on zero'd keg"));
 		zone->uz_init = arg->uminit;
 		zone->uz_fini = arg->fini;
+		zone->uz_lock = &keg->uk_lock;
 		zone->uz_flags |= UMA_ZONE_SECONDARY;
 		mtx_lock(&uma_mtx);
 		ZONE_LOCK(zone);

==== //depot/projects/smpng/sys/vm/uma_int.h#33 (text+ko) ====

@@ -358,12 +358,12 @@
 			mtx_init(&(k)->uk_lock, (k)->uk_name,	\
 			    "UMA zone", MTX_DEF | MTX_DUPOK);	\
 	} while (0)
+	    
 #define	KEG_LOCK_FINI(k)	mtx_destroy(&(k)->uk_lock)
 #define	KEG_LOCK(k)	mtx_lock(&(k)->uk_lock)
 #define	KEG_UNLOCK(k)	mtx_unlock(&(k)->uk_lock)
-
-#define	ZONE_LOCK(z)	mtx_lock(&(z)->uz_keg->uk_lock)
-#define ZONE_UNLOCK(z)	mtx_unlock(&(z)->uz_keg->uk_lock)
+#define	ZONE_LOCK(z)	mtx_lock((z)->uz_lock)
+#define ZONE_UNLOCK(z)	mtx_unlock((z)->uz_lock)
 
 /*
  * Find a slab within a hash table.  This is used for OFFPAGE zones to lookup



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