summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2013-06-14 22:30:35 -0500
committerBrian Behlendorf <[email protected]>2013-06-19 16:22:39 -0700
commite51be06697762215dc3b679f8668987034a5a048 (patch)
tree84446c5dbac3de2f8f9bee1fe67bb41096a6dfc8 /cmd
parentc99c90015ece64746e20b74245caca41d1dbefe1 (diff)
Illumos #3552, #3564
3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread 3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing) Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> References: illumos/illumos-gate@16a4a8074274d2d7cc408589cf6359f4a378c861 https://www.illumos.org/issues/3552 https://www.illumos.org/issues/3564 Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1513
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zdb/zdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 0114c4168..3eaab03fe 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -548,7 +548,7 @@ static void
dump_metaslab_stats(metaslab_t *msp)
{
char maxbuf[32];
- space_map_t *sm = &msp->ms_map;
+ space_map_t *sm = msp->ms_map;
avl_tree_t *t = sm->sm_pp_root;
int free_pct = sm->sm_space * 100 / sm->sm_size;
@@ -564,7 +564,7 @@ dump_metaslab(metaslab_t *msp)
{
vdev_t *vd = msp->ms_group->mg_vd;
spa_t *spa = vd->vdev_spa;
- space_map_t *sm = &msp->ms_map;
+ space_map_t *sm = msp->ms_map;
space_map_obj_t *smo = &msp->ms_smo;
char freebuf[32];
@@ -2194,11 +2194,11 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
for (m = 0; m < vd->vdev_ms_count; m++) {
metaslab_t *msp = vd->vdev_ms[m];
mutex_enter(&msp->ms_lock);
- space_map_unload(&msp->ms_map);
- VERIFY(space_map_load(&msp->ms_map,
+ space_map_unload(msp->ms_map);
+ VERIFY(space_map_load(msp->ms_map,
&zdb_space_map_ops, SM_ALLOC, &msp->ms_smo,
spa->spa_meta_objset) == 0);
- msp->ms_map.sm_ppd = vd;
+ msp->ms_map->sm_ppd = vd;
mutex_exit(&msp->ms_lock);
}
}
@@ -2223,7 +2223,7 @@ zdb_leak_fini(spa_t *spa)
for (m = 0; m < vd->vdev_ms_count; m++) {
metaslab_t *msp = vd->vdev_ms[m];
mutex_enter(&msp->ms_lock);
- space_map_unload(&msp->ms_map);
+ space_map_unload(msp->ms_map);
mutex_exit(&msp->ms_lock);
}
}