From: Michael Tokarev <mjt@tls.msk.ru>
To: Pavel Machek <pavel@ucw.cz>
Cc: "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: Fri, 01 Feb 2008 10:17:37 +0300 [thread overview]
Message-ID: <47A2C791.8000303@msgid.tls.msk.ru> (raw)
In-Reply-To: <20080131144030.GC983@elf.ucw.cz>
Pavel Machek wrote:
[]
>> 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.
Now that's.. interesting.
s2disk writes to a swap device/file, which should update
mtime of this device node/file. Isn't it something which
also causes the same badness?
Also, if the only concern is mtime update, what's really
wrong with it? I mean, regardless of whether such update
will finally hit the disk or not, there's not much difference
really - it updates just mtime field, and there should be
no harm in that. Unless such update first goes to a
journal (in a journalling filesystem) - which DOES modify
some on-disk structures.
>> it typically involves writing/reading something to/from
>> a given serial port (/dev/ttySxx), or to an USB device,
> Create libups.so, and link s2disk to it?
And what's the difference here again? We'll open a serial
port and write something to it - which, again, will update
mtime of that device node. Unless the said node is on a
tmpfs, exactly the same badness will happen. Not all the
world is udev, after all.
So I don't get the reason why we can't exec something here,
still. (And, for example, call splashy commands as external
processes, instead of linking all this cruft into s2disk and
resume.)
What I'm thinking about here is - s2ram mlock()s its memory.
If it will fork/exec something, that something will obviously
NOT be locked like that. Is it of some concern? Probably
not, because that something will be executed after we've
taken the snapshot.
/mjt
next prev parent reply other threads:[~2008-02-01 7:17 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 [this message]
2008-02-01 11:35 ` Rafael J. Wysocki
2008-07-13 23:26 ` David Fries
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=47A2C791.8000303@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=linux-kernel@vger.kernel.org \
--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