On Wed, 2018-06-13 at 17:11 -0700, Luis R. Rodriguez wrote:
> This tries to put a bit of this tribal knowledge into an initial udev
> rule for development with the hopes Linux distributions can later
> deploy. Three rule are added. One rule is optional for now, it should be
> extended later to be more distribution-friendly and then I think this
> may be ready for consideration for integration on distributions.
> 
> 1) scheduler setup
> 2) backlist f2fs devices
> 3) run dmsetup for the rest of devices

Hello Luis,

I think it is wrong to package the zoned block device scheduler rule in the
dm-zoned-tools package. That udev rule should be activated whether or not the
dm-zoned-tools package has been installed. Have you considered to submit the
zoned block device scheduler rule to the systemd project since today that
project includes all base udev rules?

> +# Zoned disks can only work with the deadline or mq-deadline scheduler. This 
> is
> +# mandated for all SMR drives since v4.16. It has been determined this must 
> be
> +# done through a udev rule, and the kernel should not set this up for disks.
> +# This magic will have to live for *all* zoned disks.
> +# XXX: what about distributions that want mq-deadline ? Probably easy for now
> +#      to assume deadline and later have a mapping file to enable
> +#      mq-deadline for specific serial devices?
> +ACTION=="add|change", KERNEL=="sd*[!0-9]", 
> ATTRS{queue/zoned}=="host-managed", \
> +     ATTR{queue/scheduler}="deadline"

I think it is wrong to limit this rule to SCSI disks only. Work is ongoing to
add zoned block device support to the null_blk driver. That is a block driver
and not a SCSI driver. I think the above udev rule should apply to that block
driver too.

Regarding blk-mq, from the mq-deadline source code:
        .elevator_alias = "deadline",

In other words, the name "deadline" should work both for legacy and for blk-mq
block devices.

Thanks,

Bart.


Reply via email to