Re: [PATCH] libata: Power off empty ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 4 Mar 2011 19:38:36 +0100
Tejun Heo <tj@xxxxxxxxxx> wrote:

> Hello,
> 
> On Fri, Mar 04, 2011 at 10:24:11AM -0800, Kristen Carlson Accardi wrote:
> >  	case ATA_LPM_MIN_POWER:
> > -		/* no restrictions on LPM transitions */
> > -		scontrol &= ~(0x3 << 8);
> > +		if (ata_link_nr_enabled(link) > 0)
> > +			/* no restrictions on LPM transitions */
> > +			scontrol &= ~(0x3 << 8);
> > +		else {
> > +			/* empty port, power off */
> > +			scontrol &= ~0xf;
> > +			scontrol |= (0x1 << 2);
> > +		}
> 
> Why not just do the following?
> 
> 	scontrol &= ~(0x3 << 8);

because, the IPM value is meaningless if we have no devices,
so this is a wasted operation.

> 	/* if empty, power off */
> 	if (!ata_link_nr_enabled(link)) {
> 		scontrol &= ~0xf;
> 		scontrol |= 0x1 << 2;
> 	}
> 
> Also, can you please provide some details on on which hardware you
> tested the change and how much power it actually saved?
>

This change was tested on Intel's Sandy Bridge platform.  Your power
savings will depend on how many implemented ports you have, and how
many are not being used.  For a system I tested with which had 2 ports
which I could turn off, I saved 300mW.
 
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux