diff options
author | Richard Yao <[email protected]> | 2015-08-29 12:01:07 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-09-01 15:22:07 -0700 |
commit | fb40095f5f0853946f8150481ca22602d1334dfe (patch) | |
tree | d0c1617c305088d01b7c3db29c46824c610c0f5f /module/zfs/vdev.c | |
parent | cafbd2aca3fd17be78577348d9661f4142d1eb70 (diff) |
Disable LBA weighting on files and SSDs
The LBA weighting makes sense on rotational media where the outer tracks
have twice the bandwidth of the inner tracks. However, it is detrimental
on nonrotational media such as solid state disks, where the only effect
is to ensure that metaslabs enter the best-fit allocation behavior
sooner, which is detrimental to performance. It also makes no sense on
files where the underlying filesystem can arrange things however it
wants.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3712
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 8e50ababc..7aff5455b 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -1108,6 +1108,7 @@ vdev_open_child(void *arg) vd->vdev_open_thread = curthread; vd->vdev_open_error = vdev_open(vd); vd->vdev_open_thread = NULL; + vd->vdev_parent->vdev_nonrot &= vd->vdev_nonrot; } static boolean_t @@ -1134,15 +1135,19 @@ vdev_open_children(vdev_t *vd) int children = vd->vdev_children; int c; + vd->vdev_nonrot = B_TRUE; + /* * in order to handle pools on top of zvols, do the opens * in a single thread so that the same thread holds the * spa_namespace_lock */ if (vdev_uses_zvols(vd)) { - for (c = 0; c < children; c++) + for (c = 0; c < children; c++) { vd->vdev_child[c]->vdev_open_error = vdev_open(vd->vdev_child[c]); + vd->vdev_nonrot &= vd->vdev_child[c]->vdev_nonrot; + } return; } tq = taskq_create("vdev_open", children, minclsyspri, @@ -1153,6 +1158,9 @@ vdev_open_children(vdev_t *vd) TQ_SLEEP) != 0); taskq_destroy(tq); + + for (c = 0; c < children; c++) + vd->vdev_nonrot &= vd->vdev_child[c]->vdev_nonrot; } /* |