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]
Message-ID: <87slgmrw4l.fsf-genuine-vii@john.fremlin.org>
Date:	Tue, 14 Nov 2006 13:33:14 +0000
From:	John Fremlin <not@...t.any.name>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Pavel Machek <pavel@....cz>,
	kernel list <linux-kernel@...r.kernel.org>, htejun@...il.com,
	jim.kardach@...el.com, ak@...e.de
Subject: Re: AHCI power saving

Jeff Garzik <jeff@...zik.org> writes:

> Pavel Machek wrote:
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -148,6 +148,8 @@ enum {
>>  				  PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
>>   	/* PORT_CMD bits */
>> +	PORT_CMD_ALPE		= (1 << 27), /* Aggressive Link Power Management Enable */
>> +	PORT_CMD_ASP		= (1 << 26), /* Aggressive entrance to Slumber or Partial power management states */
>>  	PORT_CMD_ATAPI		= (1 << 24), /* Device is ATAPI */
>>  	PORT_CMD_LIST_ON	= (1 << 15), /* cmd list DMA engine running */
>>  	PORT_CMD_FIS_ON		= (1 << 14), /* FIS DMA engine running */
>> @@ -486,7 +488,7 @@ static void ahci_power_up(void __iomem *
>>  	}
>>   	/* wake up link */
>> -	writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
>> +	writel(cmd | PORT_CMD_ICC_ACTIVE | PORT_CMD_ALPE | PORT_CMD_ASP, port_mmio + PORT_CMD);
>
>
> Therein lies a key problem.  Turning on all of AHCI's aggressive
> power management features DOES save a lot of power.  But at the same
> time, it shortens the life of your hard drive, particularly hard
> drives that are really PATA, but have a PATA<->SATA bridge glued on
> the drive to enable connection to SATA controllers.

Are you sure? I thought that these bits will only affect the SATA
communication between the chipset on the motherboard and the chipset
on the drive and are not related to the drive's spinning at all.

Please note that the patch is incorrect because not all AHCI chipsets
support these PM features. It would probably be best to make it
optional: it might slow down drive access, but does certainly save the
environment a little.

-
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