Re: Elevator / dm-crypt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/02/2012 07:45 PM, Heinz Diehl wrote:
> On 02.09.2012, Milan Broz wrote: 
> 
> [....]
> 
> Thanks a lot, Milan! Now it's all clear to me.
> 
> My main intention is to set "noop" as the default elevator, and switch
> to cfq for the harddisk via rc.local when booting (it's a conventional
> rotating drive, no SSD). This has the effect that all USB drives
> plugged in later will get "noop" as their active scheduler, since it's
> the default, while all partitions on the harddisk have "cfq".
> 
> This way, I avoid hair-pulling work with udev/systemd to have "noop"
> for all non-rotational drives plugged in :-)

You can also use udev rules to do this
(not tested but something like):

Add /etc/udev/rules.d/20-elevator.rules 

# set cfq for all rotational devices
SUBSYSTEM=="block", ACTION=="add", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"

(or perhaps reverse is better:)
SUBSYSTEM=="block", ACTION=="add", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"

.. or/and for USB
# set noop for usb disks
SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="sd*[!0-9]|sr*", ATTR{queue/scheduler}="noop"

(Btw I think "deadline" could be better for USB.)

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux