linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: alan@lxorguk.ukuu.org.uk, lkml@rtr.ca, axboe@suse.de,
	forrest.zhao@intel.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 08/12] libata: implement interface power management infrastructure
Date: Mon, 24 Jul 2006 17:02:15 +0900	[thread overview]
Message-ID: <44C47E87.1060806@gmail.com> (raw)
In-Reply-To: <44BE8BD0.90907@pobox.com>

Hi,

Jeff Garzik wrote:
> NAK.
> 
> Module parameters in libata are largely for turning off/on major 
> features, during a transitional testing period.  They largely provide 
> users with workaround solutions to "it won't boot" type problems.
> 
> I also think you have been seduced by the relative ease of adding this 
> control to libata, as opposed to the preferred alternative:  digging 
> through sysfs objects to find the right one to which attributes should 
> be added.
> 
> As an aside, in addition to per-controller (or per-port) sysfs powersave 
> controls, libata should [eventually] recognize the external "laptop 
> mode" setting.  When laptop mode == ON, program powersave aggresively.

* I agree that cross-port synchronization is not a particularly nice 
thing to implement, but it's a nice thing to have from user's POV. 
Also, it is necessary to implement any kind of global control like 
laptop_mode.  I think it's a necessary evil.

* I want to export per-port and eventually per-link powersave interface 
but the problem is that libata doesn't have any sysfs representation 
other than what's supplied by SCSI, which means empty links don't have 
anything to represent them in sysfs.  Unfortunately, sysfs is tied to 
driver implementation ATM, so we can't start building sysfs tree on 
as-needed basis.

So, until sysfs representation is detached from internal driver data 
structure or ATA moves out of SCSI, I don't really see how we can add 
those fine-grained knobs.  Also, although having fine knobs is a good 
thing, I think powersave with global control goes a long way by itself 
and global control is needed with or without fine knobs.

However, one thing I can think of is to implement (yet) bogus ATA bus 
and add global controls there.  e.g. /sys/bus/ata/powersave.  What do 
you think about this?

* For global control, overloading laptop_mode doesn't seem to be a good 
idea.  That's a VM-specific knob with very specific role.  I think we 
should add system-wide sysfs node - maybe /sys/power/powersave? - which 
advises the kernel about power consumption.  It can propagate powersave 
requests using notifier chain and both VM and libata can hook into it to 
control laptop_mode and libata powersaving respectively.

> In general, though, we should peek to minimize power usage for the 
> general case, where feasible.  People with huge server closets like 
> Google need every ounce of power savings possible.

I'm not too sure about enabling powersave by default, if that's what you 
mean.  Yeah, people with large server farms will definitely benefit from 
powersave.  That's why I'm thinking of implementing full powersave 
including both HIPS and DIPS on PMP.  But powersave also has the 
possibility of causing malfunctions on devices which used to work okay.

I've seen sil3112 family of controllers malfunction when powersave kicks 
in and won't be surprised to see other controllers and drives show 
erratic behavior on powersave.

Another problem is that, however minute, powersave does introduce extra 
delay when waking up and thus can negatively affect performance.  The 
performance drop should be negligible on most non-SSD devices but it's 
still there.

> With regards to the patch content:  other than the control interface, 
> the implementation looks OK.

Nice, thanks.

-- 
tejun


  reply	other threads:[~2006-07-24  9:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17  6:52 [PATCHSET] libata: implement runtime link powersave Tejun Heo
2006-07-17  6:52 ` [PATCH 02/12] libata: add ata_id_has_sata() and use it in ata_id_has_ncq() Tejun Heo
2006-07-17  6:52 ` [PATCH 04/12] libata: implement ata_all_ports list Tejun Heo
2006-07-19 19:34   ` Jeff Garzik
2006-07-17  6:52 ` [PATCH 01/12] libata: add msec_to_jiffies() Tejun Heo
2006-07-17  6:52 ` [PATCH 03/12] libata: add more SATA specific constants and macros to ata.h Tejun Heo
2006-07-19 19:32   ` Jeff Garzik
2006-07-17  6:52 ` [PATCH 08/12] libata: implement interface power management infrastructure Tejun Heo
2006-07-19 19:45   ` Jeff Garzik
2006-07-24  8:02     ` Tejun Heo [this message]
2006-07-17  6:52 ` [PATCH 11/12] ahci: implement link powersave Tejun Heo
2006-07-19 19:51   ` Jeff Garzik
2006-07-17  6:52 ` [PATCH 10/12] libata: implement standard powersave methods Tejun Heo
2006-07-19 19:50   ` Jeff Garzik
2006-07-17  6:52 ` [PATCH 05/12] libata: make counting functions global Tejun Heo
2006-07-17  6:52 ` [PATCH 09/12] libata: implement powersave timer Tejun Heo
2006-07-19 19:48   ` Jeff Garzik
2006-07-19 20:22     ` Jens Axboe
2006-07-24  7:27       ` Tejun Heo
2006-07-25  8:01         ` Jens Axboe
2006-07-17  6:52 ` [PATCH 07/12] libata: implement sata_update_scontrol() Tejun Heo
2006-07-19 19:35   ` Jeff Garzik
2006-07-17  6:52 ` [PATCH 06/12] libata: add ata_port_nr_ready() Tejun Heo
2006-07-17  6:52 ` [PATCH 12/12] sata_sil24: implement link powersave Tejun Heo
2006-07-19 19:38 ` [PATCHSET] libata: implement runtime " Jeff Garzik
2006-07-24  7:33   ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44C47E87.1060806@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=axboe@suse.de \
    --cc=forrest.zhao@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).