Skip to content

Commit

Permalink
=> openzfs#2595: dweeezil/illumos-4976-to-4984-fragmentation - Illumo…
Browse files Browse the repository at this point in the history
…s 4976-4984 - metaslab improvements.

* Illumos 4976-4984 - metaslab improvements
  4976 zfs should only avoid writing to a failing non-redundant top-level vdev
  4978 ztest fails in get_metaslab_refcount()
  4979 extend free space histogram to device and pool
  4980 metaslabs should have a fragmentation metric
  4981 remove fragmented ops vector from block allocator
  4982 space_map object should proactively upgrade when feature is enabled
  4983 need to collect metaslab information via mdb
  4984 device selection should use fragmentation metric
  Reviewed by: Matthew Ahrens <[email protected]>
  Reviewed by: Adam Leventhal <[email protected]>
  Reviewed by: Christopher Siden <[email protected]>
  Approved by: Garrett D'Amore <[email protected]>

  References:
      https://www.illumos.org/issues/4976
      https://www.illumos.org/issues/4978
      https://www.illumos.org/issues/4979
      https://www.illumos.org/issues/4980
      https://www.illumos.org/issues/4981
      https://www.illumos.org/issues/4982
      https://www.illumos.org/issues/4983
      https://www.illumos.org/issues/4984

  Notes:
      The "zdb -M" option has been re-tasked to display the new metaslab
      fragmentation metric and the new "zdb -I" option is used to control
      the maximum number of in-flight I/Os.

      The new fragmentation metric is derived from the space map histogram
      which has been rolled up to the vdev and pool level and is presented
      to the user via "zpool list".

      Add a number of module parameters related to the new metaslab weighting
      logic.

  Ported by: Tim Chase <[email protected]>

* Don't upgrade a metaslab when the pool is not writable
  Illumos 4982 added code to metaslab_fragmentation() to proactively update
  space maps when the spacemap_histogram feature is enabled.  This should
  only happen when the pool is writeable.

  References:
      https://www.illumos.org/issues/4982
  • Loading branch information
grwilson authored and FransUrbo committed Aug 19, 2014
1 parent 4fe5a22 commit 7526d9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/metaslab.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ metaslab_class_histogram_verify(metaslab_class_t *mc)
return;

mc_hist = kmem_zalloc(sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE,
KM_PUSHPAGE);
KM_SLEEP);

for (c = 0; c < rvd->vdev_children; c++) {
vdev_t *tvd = rvd->vdev_child[c];
Expand Down Expand Up @@ -583,7 +583,7 @@ metaslab_group_histogram_verify(metaslab_group_t *mg)
return;

mg_hist = kmem_zalloc(sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE,
KM_PUSHPAGE);
KM_SLEEP);

ASSERT3U(RANGE_TREE_HISTOGRAM_SIZE, >=,
SPACE_MAP_HISTOGRAM_SIZE + ashift);
Expand Down

0 comments on commit 7526d9f

Please sign in to comment.