From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Johannes Berg <johannes@sipsolutions.net>,
Thomas Renninger <trenn@suse.de>
Subject: Re: [RFC][PATCH 1/3] Hibernation: Enter platform hibernation state in a consisten way (rev. 2)
Date: Mon, 27 Aug 2007 14:25:22 +0200 [thread overview]
Message-ID: <20070827122522.GA2894@elf.ucw.cz> (raw)
In-Reply-To: <200708271431.12482.rjw@sisk.pl>
Hi!
> > > Make hibernation_platform_enter() execute the enter-a-sleep-state sequence
> > > instead of the mixed shutdown-with-entering-S4 thing.
> > >
> > > Replace the shutting down of devices done by kernel_shutdown_prepare(), before
> > > entering the ACPI S4 sleep state, with suspending them and the shutting down of
> > > sysdevs with calling device_power_down(PMSG_SUSPEND) (just like before entering
> > > S1 or S3, but the target state is now S4). Also, disable the nonboot CPUs
> > > before entering the sleep state (S4), which generally always is a good idea.
> > >
> > > This is known to fix the "double disk spin down during hibernation" on some
> > > machines, eg. HPC nx6325 (ref. http://lkml.org/lkml/2007/8/7/316 and the
> > > following thread). It also generally causes the hibernation state (ACPI S4) to
> > > be entered faster.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > ---
> > > kernel/power/disk.c | 55 ++++++++++++++++++++++++++++++++++++++--------------
> > > 1 file changed, 41 insertions(+), 14 deletions(-)
> > >
> >
> > > + local_irq_disable();
> > > + error = device_power_down(PMSG_SUSPEND);
> > > + if (!error) {
> > > + error = hibernation_ops->enter();
> > > + /* We should never get here */
> >
> > Are you sure it is good idea to enable interrupts/power up devices
> > when this happens?
>
> Hm. No, I'm not.
>
> > AFAICT image is already on disk an intact at this point, safe thing to do is
> > while(1);...
>
> OK
>
> Like this?
Yes, like this. ACK.
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:[~2007-08-27 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-26 23:49 [RFC][PATCH 0/3] PM: Improve ACPI handling during suspend and hibernation (rev. 2) Rafael J. Wysocki
2007-08-26 23:51 ` [RFC][PATCH 1/3] Hibernation: Enter platform hibernation state in a consisten way " Rafael J. Wysocki
2007-08-27 8:24 ` Pavel Machek
2007-08-27 12:31 ` Rafael J. Wysocki
2007-08-27 12:25 ` Pavel Machek [this message]
2007-08-26 23:54 ` [RFC][PATCH 2/3] PM: More fine grained ACPI handling during suspend and hibernation " Rafael J. Wysocki
2007-08-27 8:25 ` Pavel Machek
2007-08-26 23:55 ` [RFC][PATCH 3/3] PM: Improve handling of ACPI system state indicator " Rafael J. Wysocki
2007-08-27 8:27 ` 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=20070827122522.GA2894@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=johannes@sipsolutions.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
--cc=trenn@suse.de \
/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