public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <benh@kernel.crashing.org>
To: "Linus Torvalds" <torvalds@transmeta.com>, "Pavel Machek" <pavel@ucw.cz>
Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: swsusp: don't eat ide disks
Date: Mon, 4 Nov 2002 08:57:09 +0100	[thread overview]
Message-ID: <20021104075709.20542@smtp.wanadoo.fr> (raw)
In-Reply-To: <Pine.LNX.4.44.0211031439330.11657-100000@home.transmeta.com>

>Just send a request down the request list, and make sure that
>
> - the command is marked as being non-mergeable or re-orderable by 
>   software (as all special commands are)
>
> - the command is not re-orderable / mergeable by hardware (and since the
>   command in question would be something like "flush" or "spindown",
>   hardware really would be quite broken if it re-ordered it ;)
>
>and then just wait for its completion.

Ok, good, this is exactly what I was talking about in a
previous mail, escept you have the real code ;)

Though I do insist of this beeing bus ordering driven, that
is this command is to be sent down the queue by the ide-disk driver
itself, when asked for suspend by it's parent, whataver it is
(typically the PCI based controller driver).

That would exactly provide the implementation for the save_state
callback. Though there is still a small issue in using synchronize
cache vs. standby.

Our model currently specify we have save_state (which blocks IOs),
then later on, suspend, which does the actual power off. While this
is actually a good things (especially with swsusp, that should allow
us to not poweroff devices on the path to the disk, a future
optimisation avoiding a full wakeup of all devices), in this specific
case, it also means we can't use the queue at the suspend() state
to send the STANDBY command. If we send the STANDBY command (to
spin off the platters) at save_state() time instead, we get the
chance of have to wait again for re-spinning up on suspend to
disk.

Maybe the fix is as simple as doing sync. cache in save_state, standby
in suspend(), but the later beeing done without using the queue (which
is what I do in my current pmac implementation in 2.4, direct ATA reg.
blasting, ugh !). Or maybe we can find a way to carry a "hint" during
the suspend process so that save_state "knows" the device is marked
as the target for a later suspend to disk process, and "avoids"
doing a standby in that case.

What do you think ?

Ben.



  parent reply	other threads:[~2002-11-04  7:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-02 18:47 swsusp: don't eat ide disks Pavel Machek
2002-11-02 19:39 ` Linus Torvalds
2002-11-02 20:06 ` Alan Cox
2002-11-02 20:25   ` Pavel Machek
2002-11-02 22:04     ` Alan Cox
2002-11-03 20:11       ` Pavel Machek
2002-11-04  1:04         ` Rik van Riel
2002-11-06 12:34           ` Pavel Machek
2002-11-03 14:57   ` benh
2002-11-03 16:25     ` Alan Cox
2002-11-03 16:24       ` benh
2002-11-03 16:36         ` Alan Cox
2002-11-04  7:47           ` benh
2002-11-03 20:12       ` Pavel Machek
2002-11-03 21:33         ` Alan Cox
2002-11-03 22:09           ` Pavel Machek
2002-11-03 22:41             ` Alan Cox
2002-11-03 22:27               ` Pavel Machek
2002-11-03 23:56                 ` Alan Cox
2002-11-04  8:16                   ` benh
2002-11-04 13:33                     ` Alan Cox
2002-11-03 22:48             ` Linus Torvalds
2002-11-03 22:53               ` Linus Torvalds
2002-11-04  8:08                 ` benh
2002-11-04 14:59                   ` Linus Torvalds
2002-11-04 15:27                     ` Benjamin Herrenschmidt
2002-11-04  9:44                 ` Jens Axboe
2002-11-04 13:37                   ` Alan Cox
2002-11-03 22:56               ` Pavel Machek
2002-11-03 23:38                 ` Linus Torvalds
2002-11-06 13:57                   ` Pavel Machek
2002-11-04  7:57               ` benh [this message]
2002-11-04  9:39               ` Jens Axboe
2002-11-04  9:50                 ` Jens Axboe
2002-11-07 13:06       ` David Woodhouse
2002-11-07 16:15         ` Pavel Machek
2002-11-07 16:18           ` David Woodhouse
2002-11-07 20:52             ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2002-11-07 18:26 Grover, Andrew
2002-11-07 22:25 ` David Woodhouse
2002-11-08 11:09   ` Benjamin Herrenschmidt
2002-11-10 11:54   ` Pavel Machek
2002-11-11  6:38     ` David Woodhouse
2002-11-12 17:41       ` Pavel Machek

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=20021104075709.20542@smtp.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=torvalds@transmeta.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