mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3712
This commit is contained in:
committed by
Brian Behlendorf
parent
cafbd2aca3
commit
fb40095f5f
+9
-1
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user