mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: swsusp vs. modular IDE (or wherever your swap is)
  2006-01-06 14:16 swsusp vs. modular IDE (or wherever your swap is) Andrey Borzenkov
@ 2006-01-05 19:50 ` Pavel Machek
  2006-01-29 19:27   ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2006-01-05 19:50 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: linux-kernel

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.

-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* swsusp vs. modular IDE (or wherever your swap is)
@ 2006-01-06 14:16 Andrey Borzenkov
  2006-01-05 19:50 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2006-01-06 14:16 UTC (permalink / raw)
  To: linux-kernel

-----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?

TIA

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDvnu/R6LMutpd94wRAveZAKC9Vz5a7My6zphTjCeXcelrTcQQOwCfWM1Q
8v/z+GMDfYuSj6sgZGghCKI=
=8+Hb
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: swsusp vs. modular IDE (or wherever your swap is)
  2006-01-05 19:50 ` Pavel Machek
@ 2006-01-29 19:27   ` Andrey Borzenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2006-01-29 19:27 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel

-----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-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-29 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06 14:16 swsusp vs. modular IDE (or wherever your swap is) Andrey Borzenkov
2006-01-05 19:50 ` Pavel Machek
2006-01-29 19:27   ` Andrey Borzenkov

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®