public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Fries <david@fries.net>
To: Pavel Machek <pavel@ucw.cz>
Cc: Michael Tokarev <mjt@tls.msk.ru>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: hibernate/suspend-to-disk: to turn power or not?
Date: Sun, 13 Jul 2008 18:26:36 -0500	[thread overview]
Message-ID: <20080713232636.GA1916@spacedout.fries.net> (raw)
In-Reply-To: <20080131144030.GC983@elf.ucw.cz>

On Thu, Jan 31, 2008 at 03:40:30PM +0100, Pavel Machek wrote:
> > Back to the original question and a proposed solution.
> > 
> > I'm looking at the uswsusp source (while the kernel compiles),
> > and have a question here.  Is it possible to call some external
> > application (typically a shell script) to do the final work after
> > when the image has been written?  I mean in principle - I
> > understand there are some limitations here, but I don't know
> > which exactly.
> 
> No, you can't exec() anything. That would write mtime back to disk and
> cause badness.

SysRq-U remounts the disks readonly.  Why not make the disks readonly
once the kernel state is in swap, why not let any program run and give
an error to writes?

I know, long dead thread, but I too would like to tell the UPS to turn
off once the system state is resting safely in swap.  Currently my
modified apcupsd scripts tell the UPS to turn off, then tells the
kernel to hibernate, and hopes the kernel finishes in time.  I would
much rather do things the other way, but `echo disk > /sys/power/disk`
doesn't return until power is back on if everything goes well.

-- 
CC me on replies
David Fries <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)

  parent reply	other threads:[~2008-07-13 23:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 19:18 hibernate/suspend-to-disk: to turn power or not? Michael Tokarev
2008-01-30 20:12 ` Bruno Prémont
2008-01-30 21:03   ` Michael Tokarev
2008-01-30 21:11 ` Rafael J. Wysocki
2008-01-30 23:30   ` Michael Tokarev
2008-01-31 14:40     ` Pavel Machek
2008-02-01  7:17       ` Michael Tokarev
2008-02-01 11:35         ` Rafael J. Wysocki
2008-07-13 23:26       ` David Fries [this message]
2008-07-14  5:43         ` Pavel Machek
2008-01-30 21:25 ` Nigel Cunningham
2008-01-30 23:37   ` Michael Tokarev
2008-01-30 23:58     ` Nigel Cunningham

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=20080713232636.GA1916@spacedout.fries.net \
    --to=david@fries.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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