RE: [linux-pm] Power management for SCSI

From: Leisner, Martin
Date: Wed Aug 13 2008 - 16:24:25 EST


Regarding these scsi suspend patches, there's a general
problem to drop power on disk devices on a running system.
I discussed it in:

http://www.gossamer-threads.com/lists/linux/kernel/811598

We have a sequence:
a) stop further block requests
b) sync the disk (and sync the cache -- there was talk on and off
for several years about sync not realling syncing)
c) drop power on the disk

We tweak the ext3 mount timeout and the /proc/sys/vm settings to put
the computer into laptop mode.

When a read comes along, we reverse the process...(or a forced write
which generally won't happen).

But we need to add patches to the device driver and the block layer to
enable this...it seems useful if there was a more generic way to
handle it...maybe registering a callback to reenable power and a
mechanism
to start the poweroff sequence...

We've done this in 2.6.20, I wonder if there's any work along these
lines in recent kernels (I'm going to look at 2.6.2[67]...)

Marty

> -----Original Message-----
> From: linux-pm-bounces@xxxxxxxxxxxxxxxxxxxxxxxxxx [mailto:linux-pm-
> bounces@xxxxxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Alan Stern
> Sent: Wednesday, August 13, 2008 3:37 PM
> To: Oliver Neukum
> Cc: Linux-pm mailing list; kernel list; teheo@xxxxxxxxxx;
> James.Bottomley@xxxxxxxxxxxxxxxxxxxxx; Pavel Machek; Stefan Richter
> Subject: Re: [linux-pm] Power management for SCSI
>
> On Wed, 13 Aug 2008, Oliver Neukum wrote:
>
> > > In Alan's patch, SCSI calls scsi_host_template methods (if the
LLD
> > > provides ones) to suspend and resume a Scsi_Host. The LLD can
use
> them
> > > to work with the underlying infrastructure to determine what can
be
> done
> > > at that time. I.e. are there other protocols or other
initiator-
> like
> > > nodes sharing the link? If yes or if "maybe yes", the
> infrastructure
> > > keeps the link up. If not, it can move it into a low-power
state.
> >
> > That is a parculiar way of viewing it. Alan's patch introduce
runtime
> > pm attributes to the devices. Quoting:
> >
>
> With the original patch, you can't operate on the link independent
from
> the devices. But with the revised patch (whenever I manage to find
> time to write it!), you _will_ be able to.
>
> Alan Stern
>
> _______________________________________________
> linux-pm mailing list
> linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/