From: Milan Broz <gmazyland@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Elevator / dm-crypt
Date: Sun, 02 Sep 2012 21:17:27 +0200 [thread overview]
Message-ID: <5043B0C7.3020204@gmail.com> (raw)
In-Reply-To: <20120902174532.GA2954@fancy-poultry.org>
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
prev parent reply other threads:[~2012-09-02 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 16:35 [dm-crypt] Elevator / dm-crypt Heinz Diehl
2012-09-02 17:06 ` Milan Broz
2012-09-02 17:45 ` Heinz Diehl
2012-09-02 19:17 ` Milan Broz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5043B0C7.3020204@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.