svn commit: r247315 - vendor-sys/illumos/dist/uts/common/fs/zfs
Martin Matuska
mm at FreeBSD.org
Tue Feb 26 08:51:39 UTC 2013
Author: mm
Date: Tue Feb 26 08:51:39 2013
New Revision: 247315
URL: http://svnweb.freebsd.org/changeset/base/247315
Log:
Update vendor-sys/illumos/dist to illumos-gate 13968:e4988c7d0403
Illumos ZFS issues:
3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread
(fix race condition)
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Tue Feb 26 08:17:34 2013 (r247314)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Tue Feb 26 08:51:39 2013 (r247315)
@@ -1383,6 +1383,13 @@ metaslab_group_alloc(metaslab_group_t *m
mutex_exit(&mg->mg_lock);
return (-1ULL);
}
+
+ /*
+ * If the selected metaslab is condensing, skip it.
+ */
+ if (msp->ms_map->sm_condensing)
+ continue;
+
was_active = msp->ms_weight & METASLAB_ACTIVE_MASK;
if (activation_weight == METASLAB_WEIGHT_PRIMARY)
break;
@@ -1423,16 +1430,6 @@ metaslab_group_alloc(metaslab_group_t *m
mutex_enter(&msp->ms_lock);
/*
- * If this metaslab is currently condensing then pick again as
- * we can't manipulate this metaslab until it's committed
- * to disk.
- */
- if (msp->ms_map->sm_condensing) {
- mutex_exit(&msp->ms_lock);
- continue;
- }
-
- /*
* Ensure that the metaslab we have selected is still
* capable of handling our request. It's possible that
* another thread may have changed the weight while we
@@ -1458,6 +1455,16 @@ metaslab_group_alloc(metaslab_group_t *m
continue;
}
+ /*
+ * If this metaslab is currently condensing then pick again as
+ * we can't manipulate this metaslab until it's committed
+ * to disk.
+ */
+ if (msp->ms_map->sm_condensing) {
+ mutex_exit(&msp->ms_lock);
+ continue;
+ }
+
if ((offset = space_map_alloc(msp->ms_map, asize)) != -1ULL)
break;
More information about the svn-src-vendor
mailing list