Arjan van de Ven wrote:
> On Tue, 2007-07-31 at 15:27 +0900, Tejun Heo wrote:
>> Jeff Garzik wrote:
>>> Any chance the SCSI peeps could ACK this, and then let me include it in
>>> the ALPM patchset in the libata tree?
>> ATA link PS is pretty complex with HIPM, DIPM and AHCI ALPM. I'm not
>> sure whether this three level knob would be sufficient.
>
> adding more levels later is easy.
Dunno whether they would be linear levels and putting HIPM, DIPM, ALPM
selection into SCSI sysfs knob doesn't look so appealing.
>> It might be
>> good enough if we're gonna develop extensive in-kernel black/white list
>> specifying which method works on which combination but my gut tells me
>> that it's best left to userland (probably in the form of per-notebook PS
>> profile).
>
> either sucks. AHCI ALPM ought to work if it's supported; it's what other
> operating systems also use...
>> Adding to the fun, there are quite a few broken devices out there which
>> act weirdly when link PS actions are taken.
>
> do you have any specific examples that act funny with the patch in
> question here? (the patch tries to be careful, previous patches weren't
> always so please test this patch before claiming the concept as a whole
> is broken)
They were hardware problems. I don't think any amount of proper
implementation can fix them. I have one DVD RAM somewhere in my pile of
hardware which locks up solidly if any link PS mode is used and had a
report of a HDD which had problem with link PS. Can't remember the
details tho. Also, IIRC one of my wendies spins down on SLUMBER.
>> Also, I generally don't think AHCI ALPM is a good idea. It doesn't have
>> 'cool down' period before entering PS state
>
> that's a chipset implementation decision.... not part of the
> spec/technology per se.
That's actually something AHCI spec specifically states. From section
8.3.1.3.
When PxCMD.ALPE is set to ‘1’, if the HBA recognizes that there are no
commands to process, the HBA shall initiate a transition to Partial or
Slumber interface power management state based upon the setting of
PxCMD.ASP. The HBA recognizes no commands to transmit as either:
• PxSACT is set to 0h, and the HBA updates PxCI from a non-zero
value to 0h.
• PxCI is set to 0h, and a Set Device Bits FIS is received that
updates PxSACT from a non-zero value to 0h.
Have no idea why it's specified this way. Adding 100ms or 1s cool down
time wouldn't burn noticeably more power. Maybe AHCI expects the host
driver to queue commands even for non-NCQ drives but libata currently
doesn't do that.
Anyways, I don't really think this attribute belongs to SCSI sysfs
hierarchy. There currently isn't any alternative but sysfs is part of
userland visible interface and putting something into SCSI sysfs
hierarchy just because libata doesn't have one doesn't look like a good
idea.
sysfs isn't far from being detached from kobject and driver model. I
think it would be best to wait a bit and build proper libata sysfs
hierarchy which won't have to be changed later when libata departs from
SCSI. Well, it isn't really a good way but IMHO it's better than
sticking ATA power saving node into SCSI sysfs hierarchy.
Thanks.
--
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]