From: Pavel Machek <pavel@suse.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: kernel list <linux-kernel@vger.kernel.org>,
Linux-pm mailing list <linux-pm@lists.osdl.org>,
James.Bottomley@HansenPartnership.com, teheo@novell.com,
oneukum@suse.de
Subject: Re: Power management for SCSI
Date: Thu, 14 Aug 2008 15:08:12 +0200 [thread overview]
Message-ID: <20080814130812.GC2262@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0808131026320.2455-100000@iolanthe.rowland.org>
Hi!
> > Add support for autosuspend/autoresume. Lowlevel driver can use it to
> > spin the disk down and power down its SATA link, to turn off the USB
> > interface, etc.
> >
> > Spinning down the disk is useful - saves ~0.5W here. Powering down
> > SATA controller is even better -- should save ~1W.
> >
> > Now, I guess the patch will need to be split to small pieces for
> > merge... I tried to rearrange it so that the documentation and hooks
> > go before stuff that needs the hooks, and before Kconfig enabler. If
> > it looks reasonably good, I'll split it into smaller pieces.
>
> James had a number of objections to my original patch; you can read
> them here:
>
> https://lists.linux-foundation.org/pipermail/linux-pm/2008-March/016849.html
>
> I haven't had time yet to work on an improved version.
Ok, I see, "its done at the wrong level" sounds pretty serious.
First the general comments/questions:
#
#1. It's done at the wrong level: suspend "device" is actually a target
#function. There's no way on a multi-lun device we want to keep the
#flags and last_busy anywhere but in the target
So... if there's one device with Lun0==cdrom1 and Lun1==cdrom2, it is a
single target, and we want to keep flags/last busy common to all that?
What is good data structure to add? I see scsi_tgt*.h, but it is very
short, and there does not seem to be good structure to hook into.
#2. As you say in the comment, the thing we're trying to power down is
#the link. In most SCSI implementations, the link has a rather complex
#relationship to the target, what we want to do in
#periodic_autosuspend_scan() is run over the devices on each link, and
#if
#they're not busy suspend the link? What's probably needed is a set of
#adjunct helpers for the transport classes to do this.
So the host suspend/resume stuff should go into struct
scsi_transport_template?
#3. The link power down is much faster than device spin down ... in
#your
#patch these two things seem to be coupled ... we really need to keep
#them separate.
#
ACK.
#4. The entanglement with error handling is incredibly problematic
#(since
#eh is a nastily complex state machine in its own right). What do
#transports that use eh_strategy_handler do about all of this?
/me scared...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-08-14 13:08 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 9:50 Power management for SCSI Pavel Machek
2008-08-13 14:31 ` Alan Stern
2008-08-13 14:47 ` Oliver Neukum
2008-08-13 14:59 ` Alan Stern
2008-08-13 15:21 ` Oliver Neukum
2008-08-13 15:44 ` Alan Stern
2008-08-13 16:14 ` Stefan Richter
2008-08-13 16:23 ` Alan Stern
2008-08-13 16:21 ` [linux-pm] " Oliver Neukum
2008-08-13 19:34 ` Alan Stern
2008-08-14 6:08 ` Oliver Neukum
2008-08-14 15:40 ` Alan Stern
2008-08-14 13:50 ` Pavel Machek
2008-08-14 14:08 ` Oliver Neukum
2008-08-14 15:47 ` Alan Stern
2008-08-14 21:43 ` Oliver Neukum
2008-08-14 22:25 ` Alan Stern
2008-08-15 7:16 ` Oliver Neukum
2008-08-15 15:25 ` Alan Stern
2008-08-15 15:56 ` Oliver Neukum
2008-08-16 5:24 ` Greg KH
2008-08-19 13:33 ` [linux-pm] " Oliver Neukum
2008-08-19 15:28 ` Alan Stern
2008-08-19 23:22 ` Stefan Richter
2008-08-22 10:52 ` Pavel Machek
2008-08-22 22:14 ` Alan Stern
2008-08-25 12:50 ` Oliver Neukum
2008-08-25 14:45 ` Alan Stern
2008-08-25 15:05 ` Oliver Neukum
2008-08-25 16:18 ` Alan Stern
2008-08-25 17:34 ` Oliver Neukum
2008-08-25 18:39 ` Alan Stern
2008-08-13 15:24 ` Oliver Neukum
2008-08-13 15:44 ` Stefan Richter
2008-08-13 16:25 ` Oliver Neukum
2008-08-13 19:37 ` Alan Stern
2008-08-13 19:42 ` James Bottomley
2008-08-13 20:16 ` Alan Stern
2008-08-13 20:03 ` Leisner, Martin
2008-08-13 20:38 ` [linux-pm] " Alan Stern
2008-08-19 21:08 ` Leisner, Martin
2008-08-13 15:46 ` Alan Stern
2008-08-14 13:08 ` Pavel Machek [this message]
2008-08-14 15:56 ` Pavel Machek
2008-08-14 22:11 ` Stefan Richter
2008-08-19 7:38 ` Pavel Machek
2008-08-19 7:50 ` [linux-pm] " Oliver Neukum
2008-08-19 14:32 ` Alan Stern
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=20080814130812.GC2262@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=oneukum@suse.de \
--cc=stern@rowland.harvard.edu \
--cc=teheo@novell.com \
/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