lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Feb 2009 15:56:06 +0100
From:	Kay Sievers <kay.sievers@...y.org>
To:	Sitsofe Wheeler <sitsofe@...oo.com>
Cc:	Justin Piszcz <jpiszcz@...idpixels.com>,
	linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org,
	linux-raid@...r.kernel.org
Subject: Re: General question (scheduler) with SSDs?

On Fri, Feb 20, 2009 at 15:27, Sitsofe Wheeler <sitsofe@...oo.com> wrote:
> On Fri, Feb 20, 2009 at 02:23:38PM +0100, Kay Sievers wrote:
>> On Fri, Feb 20, 2009 at 14:12, Sitsofe Wheeler <sitsofe@...oo.com> wrote:
>> >
>> > I tried
>> > SUBSYSTEM=="block", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0"
>> > but udevtest /sys/block/sda/ doesn't list it as firing (udev 117-8)...
>>
>> I does here:
>>   udev_rules_apply_to_event: ATTR '/sys/devices/ ...
>> /sdb/queue/rotational' writing '0'
>>
>>   $grep . /sys/class/block/*/queue/rotational
>>   /sys/class/block/sda/queue/rotational:1
>>   /sys/class/block/sdb/queue/rotational:0
>>
>> Maybe "udevtest" is not showing it for you, or udev 117 is too old and
>> does not work that way.
>
> After you mentioned this I tried again and seemingly I was mistaken - it
> does work as you described.

Great.

> I had to make a slight rule tweak to stop
> it matching on partitions though:
>
> SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", ATTRS{model}=="ASUS-PHISON *", ATTR{queue/rotational}="0"

Newer kernels have DEVTYPE in the envent environment, and:
  ENV{DEVTYPE}=="disk"
can be used, which is easier and more reliable.

Also the whitespace after "...PHISON *" does not need to be matched.
If the match value does not end in whitespace itself, udev will match
against the value with all trailing whitespace ignored.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ