PERFORCE change 156687 for review
John Baldwin
jhb at FreeBSD.org
Mon Jan 26 07:29:04 PST 2009
http://perforce.freebsd.org/chv.cgi?CH=156687
Change 156687 by jhb at 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
More information about the p4-projects
mailing list