Discussion:
Disc driver is module, software suspend fails
(too old to reply)
Jim Carter
2005-03-23 22:42:48 UTC
Permalink
I put some printk's into 2.6.11.5 and found out the reason for this
behavior: in kernel/power/swsusp.c, static resume_device == 0. The
reason it's 0 is that swsusp_read uses name_to_dev_t to interpret
resume=/dev/sda5, a bogus block device name. The reason it's bogus
is
...
This is WONTFIX for 2.6.11, but you can be pretty sure it is going to
be fixed for SuSE 9.3, and patch is already in 2.6.12-rc1. Feel free
to betatest SuSE 9.3 ;-).
Many thanks! Definitely I'll beta-test SuSE 9.3, and download 2.6.12-rc1
for a self-compiled kernel. SuSE rocks; open source rocks!

James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: ***@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Jim Carter
2005-03-25 06:58:55 UTC
Permalink
This is WONTFIX for 2.6.11, but you can be pretty sure it is going to
be fixed for SuSE 9.3, and patch is already in 2.6.12-rc1. Feel free
to betatest SuSE 9.3 ;-).
Unfortunately the celebration was premature. I compiled 2.6.12-rc1,
noticing the new feature that you can see or alter the swap device
number in /sys/power/resume. So I'm able to suspend... but not to
resume, since the driver still isn't loaded at the time of resuming.

I tried some cowboy programming like this: in kernel/power/disk.c I
changed software_resume to be not static (i.e. extern) and not a
late_initcall. In init/main.c, in init(), just after do_basic_setup(),
I inserted a call to software_resume(). This did not even cause a
kernel panic as I had expected; there was no sign on the console, in
/var/log/boot.msg or anywhere else that software_resume had ever been
called, even with a suspended image in the swap partition.

It was worth a try, but not much more, since I'm sure there are
contingencies that I'm not taking into account. For example, the real
root filesystem is mounted (readonly), and if that makes a problem
for resuming, how can we squeeze software_resume after the initrd and
before mounting the root disc?

James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: ***@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Pavel Machek
2005-03-25 08:18:57 UTC
Permalink
Hi!
Post by Jim Carter
This is WONTFIX for 2.6.11, but you can be pretty sure it is going to
be fixed for SuSE 9.3, and patch is already in 2.6.12-rc1. Feel free
to betatest SuSE 9.3 ;-).
Unfortunately the celebration was premature. I compiled 2.6.12-rc1,
noticing the new feature that you can see or alter the swap device
number in /sys/power/resume. So I'm able to suspend... but not to
resume, since the driver still isn't loaded at the time of resuming.
There's another feature that enables you to start resume manually with
some echo to /sys... Perhaps it needs to be documented better, I'm
looking for a patch ;-).
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Stefan Seyfried
2005-03-25 10:57:46 UTC
Permalink
Post by Pavel Machek
Hi!
There's another feature that enables you to start resume manually with
some echo to /sys... Perhaps it needs to be documented better, I'm
looking for a patch ;-).
HANNES, where are you?

;-)

Stefan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Jim Carter
2005-03-28 00:30:38 UTC
Permalink
Post by Pavel Machek
There's another feature that enables you to start resume manually with
some echo to /sys... Perhaps it needs to be documented better, I'm
looking for a patch ;-).
But how can it resume from a swap device for which it has no driver?
Even if you copied the needed module(s) onto the swap device, the kernel
needs the modules to be loaded before it can read anything. The driver
would be there if resuming happened after the initrd loaded it. But
I wasn't able to make that actually work.

James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: ***@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Pavel Machek
2005-03-28 22:23:24 UTC
Permalink
Hi!
Post by Jim Carter
Post by Pavel Machek
There's another feature that enables you to start resume manually with
some echo to /sys... Perhaps it needs to be documented better, I'm
looking for a patch ;-).
But how can it resume from a swap device for which it has no driver?
You insmod driver for your swap device, then you echo device numbers
to /sys... then initiate resume.
Post by Jim Carter
Even if you copied the needed module(s) onto the swap device, the kernel
needs the modules to be loaded before it can read anything. The driver
would be there if resuming happened after the initrd loaded it. But
I wasn't able to make that actually work.
It should be possible, suse 9.3 does that...
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Loading...