From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: swsusp vs. modular IDE (or wherever your swap is)
Date: Sun, 29 Jan 2006 22:27:09 +0300 [thread overview]
Message-ID: <200601292227.10094.arvidjaar@mail.ru> (raw)
In-Reply-To: <20060105195030.GA2581@ucw.cz>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 05 January 2006 22:50, Pavel Machek wrote:
> On Fri 06-01-06 17:16:30, Andrey Borzenkov wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Do I understand correctly that swsusp requires drivers for primary swap
> > to be compiled in kernel? It appears that initrd-based implementation is
> > possible (load drivers for resume partition and then attempt to do manual
> > resume via "echo x:y > /sys/power/resume") - are there any issues
> > associated with it?
>
> Except that it eats any mounted filesystems? No. Do mounts after
> echo and you should be fine.
well, this did not work at least naively. It correctly sets resume device and
I can suspend. But on resume I see "Stopping tasks: ====" after this booting
continues. I enabled debug but do not see anything at this moment.
Contents of linuxrc up to resume point:
{pts/0}% sudo cat /tmp/rc/linuxrc
#!/bin/nash
echo "Loading ide-core.ko module"
insmod /lib/ide-core.ko
echo "Loading alim15x3.ko module"
insmod /lib/alim15x3.ko
echo "Loading ide-disk.ko module"
insmod /lib/ide-disk.ko
echo "Loading reiserfs.ko module"
insmod /lib/reiserfs.ko
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Mounting sysfs
mount -t sysfs none /sys
echo Creating device files
mountdev size=32M,mode=0755
echo -n /sbin/hotplug > /proc/sys/kernel/hotplug
mkdir /dev/.udevdb
mkdevices /dev
echo Attempting resume
resume
resume is builtin (on top of RH/Mandriva nash):
int resumeCommand(char * cmd, char * end) {
char buf[20];
struct stat statbuf;
int fd;
int size;
char *resume, *rend;
resume = getKernelArg("resume=");
if (resume == NULL)
return 0;
rend = resume;
while (*rend && !isspace(*rend)) rend++;
*rend = '\0';
if ((stat(resume, &statbuf) == 0)) {
fd = open("/sys/power/resume", O_RDWR, 0);
if (fd < 0)
return 1;
size = snprintf(buf, sizeof(buf), "%u:%u",
major(statbuf.st_rdev), minor(statbuf.st_rdev));
if (size <= sizeof(buf))
write(fd, buf, size);
/* SHOULD NOT REACH HERE */
}
close(fd);
return 1;
}
and I boot with resume=/dev/hda1
Unfortunately, serial console is near to impossible (it is notebook without
COM port :(
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD3RcNR6LMutpd94wRArkwAJ94fiVsVaOO9INJieJqsjgvnc/DvACgqSR5
6LxKuaVPSzXKaEyMml9cT+4=
=a4Zh
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2006-01-29 19:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 14:16 Andrey Borzenkov
2006-01-05 19:50 ` Pavel Machek
2006-01-29 19:27 ` Andrey Borzenkov [this message]
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=200601292227.10094.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®