All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	Aaron Lu <aaron.lu@intel.com>, Jeff Garzik <jgarzik@pobox.com>,
	Aaron Lu <aaron.lwe@gmail.com>, Jack Wang <jack_wang@usish.com>,
	Shane Huang <shane.huang@amd.com>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi: sd: set ready_to_power_off for scsi disk
Date: Thu, 13 Sep 2012 22:18:24 +0200	[thread overview]
Message-ID: <1787325.sGDVDNVD6E@linux-lqwf.site> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1209131213450.21932-100000@netrider.rowland.org>

On Thursday 13 September 2012 12:24:46 Alan Stern wrote:
> On Thu, 13 Sep 2012, Oliver Neukum wrote:

> > Yes, but this confusion is necessary. The driver core is supposed to
> > be generic and knows strictly speaking only suspended and active.
> > It is a driver's job to do what needs to be done and translate this
> > into the appropriate device states.
> 
> Currently the sd driver's suspend routine is not very sophisticated.  
> It needs to become smarter about the differences between system
> suspend, runtime suspend, and power off.

In what way?

> > Well, yes, but we need support modes of power management that cut off
> > power to the disk in any case, so what does it matter if we also do it for
> > runtime PM?
> > 
> > Are you concerned about layering?
> 
> It sounds like James is partly concerned about efficiency.  If Lin
> Ming's patches are merged then we will be doing runtime suspend
> relatively often, not just when the device file is closed.  The
> sd_suspend routine should know when SYNCHRONIZE CACHE is needed and
> when it can be skipped.

How? This depends on the hardware?

> From what I gather of this discussion, we can avoid flushing the cache 
> during (1) a runtime suspend provided (2) the drive isn't going to be 
> powered down.  If either (1) or (2) doesn't hold then the cache needs 
> to be synchronized.

This is true, but how is it relevant?

> The problem with relying on the internal timers and the power
> management mode page is that the transitions take place automatically
> and the host system doesn't know about them.  We _want_ to know about
> them so that the higher layers of the device tree can go to low power
> when the disk does.

Why would you want that to correlate? The operation of the controller
and the driver is independent of the state.
And what would it tell us, as the driver knows aout all IO anyway?

	Regards
		Oliver



  reply	other threads:[~2012-09-13 20:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13  7:40 [PATCH 0/2] Support runtime power off of HDD Aaron Lu
2012-09-13  7:40 ` [PATCH 1/2] scsi: sd: set ready_to_power_off for scsi disk Aaron Lu
2012-09-13  8:14   ` James Bottomley
2012-09-13  8:23     ` Aaron Lu
2012-09-13  8:37       ` James Bottomley
2012-09-13  8:49         ` Aaron Lu
2012-09-13  8:56           ` James Bottomley
2012-09-13  9:07             ` Aaron Lu
2012-09-13  9:26               ` James Bottomley
2012-09-13 10:16                 ` Oliver Neukum
2012-09-13 10:51                   ` James Bottomley
2012-09-13 12:34                     ` Oliver Neukum
2012-09-13 16:24                       ` Alan Stern
2012-09-13 20:18                         ` Oliver Neukum [this message]
2012-09-13 20:46                           ` Alan Stern
2012-09-14  6:57                         ` Aaron Lu
2012-09-14  8:15                         ` James Bottomley
2012-09-14  5:20                 ` Aaron Lu
2012-09-14  8:17                   ` James Bottomley
2012-09-14  8:48                     ` Aaron Lu
2012-09-14 10:26                       ` James Bottomley
2012-09-14 13:54                         ` Aaron Lu
2012-09-17 15:01                           ` Aaron Lu
2012-09-13  7:40 ` [PATCH 2/2] libata: acpi: set can_power_off for both ODD and HDD Aaron Lu

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=1787325.sGDVDNVD6E@linux-lqwf.site \
    --to=oliver@neukum.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=aaron.lu@intel.com \
    --cc=aaron.lwe@gmail.com \
    --cc=jack_wang@usish.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=shane.huang@amd.com \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.