linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: device suspend/resume
Date: Tue, 24 May 2005 08:21:29 +0200	[thread overview]
Message-ID: <20050524062128.GT9855@suse.de> (raw)
In-Reply-To: <1116886206.5021.42.camel@mulgrave>

On Mon, May 23 2005, James Bottomley wrote:
> On Mon, 2005-05-23 at 16:45 -0400, Jeff Garzik wrote:
> > On Mon, May 23, 2005 at 03:41:15PM -0500, James Bottomley wrote:
> > > The thread petered out before a resolution, however, I think
> > > at least disk devices should be doing a synchronize cache on suspend.
> > 
> > Agreed.
> 
> OK, try this as a straw horse.  It plumbs our scsi bus model into
> suspend and resume via the driver (which would be the ULD) function.
> The only ULD which has an extra function is sd, and all it does is
> synchronize the cache if it was writeback.  I believe you translate SYNC
> CACHE in libata, so this patch should be sufficient (unless we still
> have a problem with ATA devices that lie about their cache types?)
> 
> I think this is sufficient, because if the LLD also wants this
> information, it can get it from the model of the bus it's attached to.

suspend/resume is a lot more complicated than just flushing a cache, the
below will probably get you safe asleep but you will never get devices
alive again after power-up on suspend-to-ram.

I also greatly prefer issuing a standby command to the drive after the
flush, so that we don't risk using the emergency parks of the drive. If
a drive happens to lie about wrt the flush command, it gets an extra
chance to flush the cache as it now knows that power will be gone very
soon. So I think the ->suspend/->resume hooks should belong to the LLD,
not the ULD as the ULD has no idea how to suspend all devices types.


-- 
Jens Axboe


  reply	other threads:[~2005-05-24  6:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-23 20:15 [PATCH] libata: device suspend/resume Jeff Garzik
2005-05-23 20:41 ` James Bottomley
2005-05-23 20:45   ` Jeff Garzik
2005-05-23 22:10     ` James Bottomley
2005-05-24  6:21       ` Jens Axboe [this message]
2005-05-24  6:53         ` Jeff Garzik
2005-05-24  7:06           ` Hannes Reinecke
2005-05-24  7:08             ` Jens Axboe
2005-05-24  7:16             ` Jeff Garzik
2005-05-24  7:07           ` Jens Axboe
2005-05-24  7:10             ` Jeff Garzik
2005-05-24  7:13               ` Jens Axboe
2005-05-27  2:49                 ` libata, SCSI and storage drivers Jeff Garzik
2005-05-27  6:45                   ` Douglas Gilbert
2005-05-27 14:41                     ` Luben Tuikov
2005-05-24  7:14               ` [PATCH] libata: device suspend/resume Hannes Reinecke
2005-05-24  7:15                 ` Jens Axboe
2005-05-24  7:18                 ` Jeff Garzik
2005-05-24 10:17                   ` Douglas Gilbert
2005-05-24 17:10                     ` Jeff Garzik
2005-05-24  7:59           ` Jens Axboe
2005-05-24  8:21             ` Jeff Garzik
2005-05-24  8:51               ` Jens Axboe
2005-05-24 16:37                 ` Jeff Garzik
2005-05-25  9:29                   ` Jens Axboe
2005-05-25 23:40                     ` Guennadi Liakhovetski
2005-05-26  1:05                     ` Jeff Garzik
2005-05-26  5:57                       ` Jens Axboe
2005-05-26 22:56                     ` Bartlomiej Zolnierkiewicz
2005-05-27  6:54                       ` Jens Axboe
2005-05-27  2:01                     ` Benjamin Herrenschmidt
2005-05-27  6:55                       ` Jens Axboe
2005-05-24 13:48           ` Luben Tuikov
2005-05-24 17:29             ` Jeff Garzik
2005-05-24 13:05         ` Luben Tuikov
2005-05-27  2:54       ` Jeff Garzik
2005-05-24 16:27   ` Mark Lord
2005-05-24 16:33     ` Mark Lord
2005-05-24 16:04 ` Mark Lord

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=20050524062128.GT9855@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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).