aboutsummaryrefslogtreecommitdiffstats
path: root/rpm/generic/zfs-dkms.spec.in
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2019-02-20 09:59:57 -0800
committerBrian Behlendorf <[email protected]>2019-02-20 09:59:56 -0800
commit928e8ad47d3478a3d5d01f0dd6ae74a9371af65e (patch)
tree877e0d0920705d870aa96183c305957e94dc5e9d /rpm/generic/zfs-dkms.spec.in
parentbb1be77a35d3cf5389a36f1d13935811962278c3 (diff)
Introduce auxiliary metaslab histograms
This patch introduces 3 new histograms per metaslab. These histograms track segments that have made it to the metaslab's space map histogram (and are part of the spacemap) but have not yet reached the ms_allocatable tree on loaded metaslab's because these metaslab's are currently syncing and haven't gone through metaslab_sync_done() yet. The histograms help when we decide whether to load an unloaded metaslab in-order to allocate from it. When calculating the weight of an unloaded metaslab traditionally, we look at the highest bucket of its spacemap's histogram. The problem is that we are not guaranteed to be able to allocated that segment when we load the metaslab because it may still be at the freeing, freed, or defer trees. The new histograms are used when we try to calculate an unloaded metaslab's weight to deal with this issue by removing segments that have would not be in the allocatable tree at runtime. Note, that this method of dealing with this is not completely accurate as adjacent segments are not always consolidated in the space map histogram of a metaslab. In addition and to make things deterministic, we always reset the weight of unloaded metaslabs based on their space map weight (instead of doing that on a need basis). Thus, every time a metaslab is loaded and its weight is reset again (from the weight based on its space map to the one based on its allocatable range tree) we expect (and assert) that this change in weight can only get better if it doesn't stay the same. Reviewed by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #8358
Diffstat (limited to 'rpm/generic/zfs-dkms.spec.in')
0 files changed, 0 insertions, 0 deletions