From: Pavel Machek <pavel@suse.cz>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] Add support to resume swsusp from initrd
Date: Sun, 5 Dec 2004 22:12:31 +0100 [thread overview]
Message-ID: <20041205211230.GC1012@elf.ucw.cz> (raw)
In-Reply-To: <1102279686.9384.22.camel@tyrosine>
Hi!
> These two patches do two things:
>
> 1) The first removes __init declarations from swsusp code
> 2) The second allows for the resume device to be set from userspace (ie,
> without having to use name_to_dev_t) and also allows for resumes to be
> triggered from userspace.
>
> A /sys/power/resume file is added. Doing
>
> echo -n "set 03:02" >/sys/power/resume
I'd prefer not to have this one. Is it actually usefull? Then resume
could be triggered by echo -n "03:02" > /sys/power/resume...
> will set /dev/hda2 as the resume device.
>
> echo -n "resume 03:02" >/sys/power/resume
>
> will attempt a resume from /dev/hda2. Patches are against
> 2.6.10-rc3.
Nice way to loose your data :-). [Note note note -- I'm not going to
merge it before my bigdiff goes to mainline, so expect to rediff it
when 2.6.10 is out. I can generate the big diff if you want to test it
now.]
You really need to make sure that userland processes are stopped
before swsusp-resume is started. You should do freeze_process(). Then
resume process depends on having enough memory available, so you
probably want to free_some_memory() and warn in documentation about
the fact.
Ugh, and you really should document "list of bad ideas with resume
from userspace". It is extremely easy to shoot yourself into the foot
with this one.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
next prev parent reply other threads:[~2004-12-05 21:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-05 20:48 [PATCH/RFC] Add support to resume swsusp from initrd Matthew Garrett
2004-12-05 21:12 ` Pavel Machek [this message]
2004-12-05 21:21 ` Matthew Garrett
2004-12-05 21:29 ` Pavel Machek
2004-12-05 21:42 ` Matthew Garrett
2004-12-05 21:49 ` Pavel Machek
2004-12-06 10:02 ` Stefan Seyfried
2004-12-05 21:18 ` Pavel Machek
2004-12-06 23:15 ` Matthew Garrett
2004-12-07 9:44 ` Pavel Machek
2004-12-07 11:39 ` Matthew Garrett
2004-12-07 11:46 ` 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=20041205211230.GC1012@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.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