Print this page
7938 Port ZOL #3712 disable LBA weighting on files and SSDs

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/metaslab.c
          +++ new/usr/src/uts/common/fs/zfs/metaslab.c
↓ open down ↓ 1654 lines elided ↑ open up ↑
1655 1655  
1656 1656          /*
1657 1657           * Modern disks have uniform bit density and constant angular velocity.
1658 1658           * Therefore, the outer recording zones are faster (higher bandwidth)
1659 1659           * than the inner zones by the ratio of outer to inner track diameter,
1660 1660           * which is typically around 2:1.  We account for this by assigning
1661 1661           * higher weight to lower metaslabs (multiplier ranging from 2x to 1x).
1662 1662           * In effect, this means that we'll select the metaslab with the most
1663 1663           * free bandwidth rather than simply the one with the most free space.
1664 1664           */
1665      -        if (metaslab_lba_weighting_enabled) {
     1665 +        if (!vd->vdev_nonrot && metaslab_lba_weighting_enabled) {
1666 1666                  weight = 2 * weight - (msp->ms_id * weight) / vd->vdev_ms_count;
1667 1667                  ASSERT(weight >= space && weight <= 2 * space);
1668 1668          }
1669 1669  
1670 1670          /*
1671 1671           * If this metaslab is one we're actively using, adjust its
1672 1672           * weight to make it preferable to any inactive metaslab so
1673 1673           * we'll polish it off. If the fragmentation on this metaslab
1674 1674           * has exceed our threshold, then don't mark it active.
1675 1675           */
↓ open down ↓ 1742 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX