Skip to contentSkip to conversation

: suspend to disk only available if non-modular IDE

PATCH Applied Arkadiusz Miskiewicz 5 participants 10 messages Mar 28, 2004 – Apr 1, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : suspend to disk only available if non-modular IDE

Hi,

resume from disk doesn't work when using modular IDE so this patch disables this in config:

power/Kconfig 2004-03-28 21:32:25.988479784 +0200 renamed from power/Kconfig~ 2004-03-28 21:32:03.198944320 +0200 +1 -1
@@ -44,7 +44,7 @@
 
 config PM_DISK
        bool "Suspend-to-Disk Support"
-       depends on PM && SWAP
+       depends on PM && SWAP && IDE=y && BLK_DEV_IDEDISK=y
        ---help---
          Suspend-to-disk is a power management state in which the contents
          of memory are stored on disk and the entire system is shut down or

Info here:
http://groups.google.com/groups?selm=1BdIH-5WB-17%40gated-at.bofh.it&oe=UTF-8&output=gplain

Signature · 2 lines
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
#1 lore raw

Applied to 2.4 and 2.6.

Thanks and regards,

Nigel

Quoted 19 lines · Arkadiusz Miskiewicz

Hi,

resume from disk doesn't work when using modular IDE so this patch disables this in config:

power/Kconfig 2004-03-28 21:32:25.988479784 +0200 renamed from power/Kconfig~ 2004-03-28 21:32:03.198944320 +0200 +1 -1
@@ -44,7 +44,7 @@
 
 config PM_DISK
        bool "Suspend-to-Disk Support"
-       depends on PM && SWAP
+       depends on PM && SWAP && IDE=y && BLK_DEV_IDEDISK=y
        ---help---
          Suspend-to-disk is a power management state in which the contents
          of memory are stored on disk and the entire system is shut down or

Info here:
http://groups.google.com/groups?selm=1BdIH-5WB-17%40gated-at.bofh.it&oe=UTF-8&output=gplain

Signature · 7 lines
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.
#2 lore raw

Oh.. should have said... "Applied to 2.4 and 2.6 suspend2 trees."

Nigel

Quoted 26 lines · Nigel Cunningham

Applied to 2.4 and 2.6.

Thanks and regards,

Nigel

Quoted 19 lines · Arkadiusz Miskiewicz

Hi,

resume from disk doesn't work when using modular IDE so this patch disables this in config:

power/Kconfig 2004-03-28 21:32:25.988479784 +0200 renamed from power/Kconfig~ 2004-03-28 21:32:03.198944320 +0200 +1 -1
@@ -44,7 +44,7 @@
 
 config PM_DISK
        bool "Suspend-to-Disk Support"
-       depends on PM && SWAP
+       depends on PM && SWAP && IDE=y && BLK_DEV_IDEDISK=y
        ---help---
          Suspend-to-disk is a power management state in which the contents
          of memory are stored on disk and the entire system is shut down or

Info here:
http://groups.google.com/groups?selm=1BdIH-5WB-17%40gated-at.bofh.it&oe=UTF-8&output=gplain

Signature · 7 lines
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.
#3 lore raw

so suspend to disk does not work with scsi?

Quoted 2 lines
Quoted 2 lines

power/Kconfig 2004-03-28 21:32:25.988479784 +0200 line 47

Quoted 2 lines
power/Kconfig 2004-03-28 21:32:25.988479784 +0200 renamed from power/Kconfig~ 2004-03-28 21:32:03.198944320 +0200 +1 -1
-       depends on PM && SWAP
+       depends on PM && SWAP && IDE=y && BLK_DEV_IDEDISK=y

implies IDE is needed.

btw: would it be somehow possible to resume after initrd phase? or some other idea how a generic kernel with modules in the initrd could use suspend to disk? or a laptop where the initrd is needed to setup a dm-crypt volume with the right decrypton key?

Regards, Andreas

#4 lore raw

Hi.

Quoted 6 lines · Andreas Jellinghaus

so suspend to disk does not work with scsi?

Quoted 2 lines
Quoted 2 lines

power/Kconfig 2004-03-28 21:32:25.988479784 +0200 line 47

Quoted 2 lines
power/Kconfig 2004-03-28 21:32:25.988479784 +0200 renamed from power/Kconfig~ 2004-03-28 21:32:03.198944320 +0200 +1 -1
-       depends on PM && SWAP
+       depends on PM && SWAP && IDE=y && BLK_DEV_IDEDISK=y

implies IDE is needed.

It is at the moment, I'm afraid. I'm hoping to get SCSI support for suspend2 finished shortly. I did suspend a OSDL machine to SCSI in January, but the driver lacked the power management that I needed to reload the second half of the image and thereby be sure all was okay.

Quoted 4 lines

btw: would it be somehow possible to resume after initrd phase? or some other idea how a generic kernel with modules in the initrd could use suspend to disk? or a laptop where the initrd is needed to setup a dm-crypt volume with the right decrypton key?

That should be doable, provided that the initrd doesn't mount anything. Decryption is 'interesting'. The key needs to be set up in the resumed kernel too. (Shouldn't be a problem, if you manage to suspend to it!).

Regards,

Nigel

Signature · 7 lines
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.
#5 lore raw

[currently no scsi support]
ah, ok.

Quoted 8 lines
Quoted 4 lines

btw: would it be somehow possible to resume after initrd phase? or some other idea how a generic kernel with modules in the initrd could use suspend to disk? or a laptop where the initrd is needed to setup a dm-crypt volume with the right decrypton key?

That should be doable, provided that the initrd doesn't mount anything. Decryption is 'interesting'. The key needs to be set up in the resumed kernel too. (Shouldn't be a problem, if you manage to suspend to it!).

I don't know if loading modules can be done without, but the usual way is to mount /sys and /proc so you can see what hardware is available.

I do that too for my dm-crypt setup, even mount a tmpfs at /dev, create devices, start usb hotplugging, etc. but after getting the decryption key, all filesystems are unmounted again, all processes killed, there is nothing visible to me left. would that still create some problems in the kernel internals preventing resume (or making it too hard to do)?

Regards, Andras

#6 lore raw

Hi.

Quoted 6 lines · Andreas Jellinghaus
Quoted 3 lines

That should be doable, provided that the initrd doesn't mount anything. Decryption is 'interesting'. The key needs to be set up in the resumed kernel too. (Shouldn't be a problem, if you manage to suspend to it!).

I don't know if loading modules can be done without, but the usual way is to mount /sys and /proc so you can see what hardware is available.

They would be fine. The key thing is that none of the filesystems which have journals get mounted. That would cause the crash recovery routines to run, resulting inconsistency between the image on disk and the one that the suspend image contains. You could probably do just about anything, so long as those filesystems aren't mounted. Assuming that is done, actually calling suspend after an initrd is run shouldn't be a problem, so far as I know.

Regards,

Nigel

Signature · 7 lines
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.
#7 lore raw
In reply to Nigel Cunningham

Hi!

Quoted 1 line

Applied to 2.4 and 2.6.

Bad idea. For swsusp2 the patch is bad because it can resume from after initrd (IIRC). For swsusp1 patch is bad
because it should be able to resume
from usb mass storage drive.

Pavel

Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         
#8 lore raw

Hi.

Quoted 8 lines · Pavel Machek

Hi!

Quoted 1 line

Applied to 2.4 and 2.6.

Bad idea. For swsusp2 the patch is bad because it can resume from after initrd (IIRC). For swsusp1 patch is bad
because it should be able to resume
from usb mass storage drive.

So long as the initrd doesn't mess our filesystems up, we should be okay, shouldn't we?

Nigel

Signature · 7 lines
Nigel Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur 
with alarming frequency, order arises from chaos, and no one is given credit.
#9 lore raw

Hi!

Quoted 9 lines
Quoted 6 lines
Quoted 1 line

Applied to 2.4 and 2.6.

Bad idea. For swsusp2 the patch is bad because it can resume from after initrd (IIRC). For swsusp1 patch is bad
because it should be able to resume
from usb mass storage drive.

So long as the initrd doesn't mess our filesystems up, we should be okay, shouldn't we?

As long as we test it once a while, yes.

But if resume from initrd works there's no reason to disallow modular IDE... and that was what patch did.
Pavel

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]