ZFS on Linux has had a feature "Disable LBA weighting on SSD" since August 2015:
http://open-zfs.org/wiki/Features#Disable_LBA_Weighting_on_files_and_SSDs
https://github.com/zfsonlinux/zfs/commit/fb40095f5f0853946f8150481ca22602d1334dfe

Because we have the driver property "device-solid-state" we can port this over. 
In addition, we should add detection for virtio vioblk device, which should 
also not use LBA weighting.

On linux, block devices have a "non-rotational" property, so this is a one 
liner in vdev_disk.c:
v->vdev_nonrot = blk_queue_nonrot(bdev_get_queue(vd->vd_bdev));

We do not, so the checks are a little bit more cumbersome but doable (check 
device-solid-state != 0 and inquiry-vendor-id==Virtio separately)

QUESTIONS
1. Linux has a non rotational property for block devices. Should we? By moving 
this out of ZFS it could be used in other places. Besides SSD, this property 
would apply to zvols, Virtio disks, and potentially in the future, network 
block devices (e.g. ceph)
2. Is there a better or more preferred way to check for a Virtio vioblk device 
besides checking inquiry-vendor-id ?
3. Since this is a straight port of all but the code in vdev_disk.c, I did not 
add copyright messages. This will cause git pbchk to gripe. How is this 
typically handled?
4. OpenZFS developers: your repo is out of sync with illumos-gate; I don’t know 
how to create a PR on github that does not also include other commits not yet 
merged into your fork. Pointers appreciated.

Thanks as always for everyone’s guidance and feedback
james
---
Issue: https://www.illumos.org/issues/7938

Webrev: http://cr.illumos.org/~webrev/jblachly/zfs_lba_weighting/

Git commit: 
https://github.com/jblachly/illumos-gate/commit/863ed00ba3278bfec58a0edb504ad484fac0c10b





-------------------------------------------
openzfs-developer
Archives: https://www.listbox.com/member/archive/274414/=now
RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c
Powered by Listbox: http://www.listbox.com

Reply via email to