From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.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: Wed, 19 Jul 2006 15:45:20 -0400 [thread overview]
Message-ID: <44BE8BD0.90907@pobox.com> (raw)
In-Reply-To: <11531191522798-git-send-email-htejun@gmail.com>
Tejun Heo wrote:
> Implement interface power management infrastructure. To discern link
> power management from device power management (suspend/resume), link
> power management is called 'powersave' or 'PS' while device power
> mangement is called 'power management' or 'PM'.
>
> libata PS infrastructure is primarily designed to accomodate SATA link
> powersave (link ACTIVE/PARTIAL/SLUMBER) but is not limited to it.
> libata implements the following powersave modes.
>
> * none : no powersave, link is powered up all the time
> * HIPS : host-initiated powersave
> * DIPS : device-initiated powersave
> * static : no powersave on occupied link, power off empty link
> * HIPS/static : HIPS on occupied link, power off empty link
> * DIPS/static : DIPS on occupied link, power off empty link
>
> HIPS/DIPS are called dynamic PS while static is static PS. LLD can
> indicate which dynamic PS modes it supports using ATA_FLAG_HIPS and
> ATA_FLAG_DIPS. Static mode support is mandatory but LLD is free to
> implement it as noop. In fact, if LLD doesn't implement any powersave
> feature, libata will automatically handle static PS as noop.
>
> PS mode is disengaged during EH recovery and reenabled on recovery
> completion. Device configuration for DIPS is done by libata EH and
> LLD only has to configure the controller when instructed via
> ->set_powersave() callback.
>
> libata guarantees that there is a reset before changing PS mode.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> +static int libata_powersave = 0; /* protected by all_ports_mutex */
> +module_param_call(powersave, ata_param_set_powersave, param_get_int,
> + &libata_powersave, 0644);
> +MODULE_PARM_DESC(powersave, "Powersave mode (0=none, 1=HIPS, 2=DIPS, "
> + "3=static, 4=HIPS/static, 5=DIPS/static)");
> +
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.
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.
With regards to the patch content: other than the control interface,
the implementation looks OK.
next prev parent reply other threads:[~2006-07-19 19:45 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 04/12] libata: implement ata_all_ports list Tejun Heo
2006-07-19 19:34 ` Jeff Garzik
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 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 10/12] libata: implement standard powersave methods Tejun Heo
2006-07-19 19:50 ` Jeff Garzik
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 08/12] libata: implement interface power management infrastructure Tejun Heo
2006-07-19 19:45 ` Jeff Garzik [this message]
2006-07-24 8:02 ` Tejun Heo
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 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 05/12] libata: make counting functions global Tejun Heo
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=44BE8BD0.90907@pobox.com \
--to=jgarzik@pobox.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@suse.de \
--cc=forrest.zhao@intel.com \
--cc=htejun@gmail.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).