From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nl5pbZ_9JqKD for ; Sun, 2 Sep 2012 21:17:32 +0200 (CEST) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Sun, 2 Sep 2012 21:17:32 +0200 (CEST) Received: by wgbdr13 with SMTP id dr13so4032575wgb.1 for ; Sun, 02 Sep 2012 12:17:32 -0700 (PDT) Message-ID: <5043B0C7.3020204@gmail.com> Date: Sun, 02 Sep 2012 21:17:27 +0200 From: Milan Broz MIME-Version: 1.0 References: <20120902163543.GA1581@fancy-poultry.org> <50439201.1080300@gmail.com> <20120902174532.GA2954@fancy-poultry.org> In-Reply-To: <20120902174532.GA2954@fancy-poultry.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Elevator / dm-crypt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de 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