Skip to contentSkip to conversation

Hibernation and suspend patchset

DISCUSSION Rafael J. Wysocki 3 participants 12 messages May 1, 2007 – May 4, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi,

I've put together a quilt patchset that contains some hibernation and suspend patches from Johannes, Pekka, me and some other people that either have already been merged with the mainline, but are not present in 2.6.21, or are included in the -mm tree, or have been sent for a review to this list.

The patches are available at:

http://www.sisk.pl/kernel/hibernation_and_suspend/

where the '2.6.21' directory contains the patchset against the 2.6.21 kernel, and will contain daily snapshots of the patchset. Later on I'll add analogous directories for subsequent -rc and 'vanilla' kernels.

The most recent patchset agains the latest 'vanilla' or -rc kernel (whichever is more recent) will always be available at

http://www.sisk.pl/kernel/hibernation_and_suspend/current/patches/

or, as a tarball, at:

http://www.sisk.pl/kernel/hibernation_and_suspend/current_snapshot.tgz

The present patchset against 2.6.21, tested a bit on x86_64, contains some 'glue' patches that I have added to be able to apply the other patches cleany on top of 2.6.21. When 2.6.21-rc1 is out, I'll rediff the entire patchset against it and then, hopefully, no such 'glue' patches will be necessary.

I'm going to track and include in the patchset all patches that affect:
- any files under kernel/power
- any files under Documentation/power
- include/linux/freezer.h
- include/linux/pm.h
- include/linux/suspend.h
- kernel/freezer.c
and some architecture-dependent files related to hibernation/suspend (patches that don't affect these files may be included too, if they are related to hibernation/suspend) and that have been posted for a review either to this list or to the LKML and have not received negative comments.

If you know of a patch that in your opinion should be included but currently is not, please let me know.

Greetings,
Rafael

Signature · 3 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
#1 lore raw
Quoted 12 lines · Rafael J. Wysocki

I'm going to track and include in the patchset all patches that affect:
- any files under kernel/power
- any files under Documentation/power
- include/linux/freezer.h
- include/linux/pm.h
- include/linux/suspend.h
- kernel/freezer.c
and some architecture-dependent files related to hibernation/suspend (patches that don't affect these files may be included too, if they are related to hibernation/suspend) and that have been posted for a review either to this list or to the LKML and have not received negative comments.

Quoted 2 lines

If you know of a patch that in your opinion should be included but currently is not, please let me know.

Shouldn't you also include all files under drivers/base/power?

Alan Stern

#2 lore raw
Quoted 14 lines · Alan Stern
Quoted 12 lines · Rafael J. Wysocki

I'm going to track and include in the patchset all patches that affect:
- any files under kernel/power
- any files under Documentation/power
- include/linux/freezer.h
- include/linux/pm.h
- include/linux/suspend.h
- kernel/freezer.c
and some architecture-dependent files related to hibernation/suspend (patches that don't affect these files may be included too, if they are related to hibernation/suspend) and that have been posted for a review either to this list or to the LKML and have not received negative comments.

Quoted 4 lines
Quoted 2 lines

If you know of a patch that in your opinion should be included but currently is not, please let me know.

Shouldn't you also include all files under drivers/base/power?

Yes, absolutely.

I forgot to put them on the list. :-)

Greetings,
Rafael

#3 lore raw
In reply to Rafael J. Wysocki

Hi again,

I just took your whole patchset, removed two patches that wouldn't apply against Linus's current git tree, put mine for suspend to disk on G5 on top of it, then applied the freezer fix I just sent and finally tested the whole thing. It works :)

johannes

#6 lore raw
In reply to Rafael J. Wysocki

Hi Rafael,

Some bugs with freezer_exempt:

kernel/softirq.c: In function ‘ksoftirqd’:
kernel/softirq.c:515: warning: implicit declaration of function ‘freezer_exempt’ [...]

Maybe some header file they all use pulls in freezer.h on x86 but not on powerpc? This fixes it.

drivers/block/loop.c +1 -0
@@ -74,6 +74,7 @@
 #include <linux/highmem.h>
 #include <linux/gfp.h>
 #include <linux/kthread.h>
+#include <linux/freezer.h>
 
 #include <asm/uaccess.h>
 
drivers/ieee1394/ieee1394_core.c +1 -0
@@ -34,6 +34,7 @@
 #include <linux/kthread.h>
 #include <linux/preempt.h>
 #include <linux/time.h>
+#include <linux/freezer.h>
 
 #include <asm/system.h>
 #include <asm/byteorder.h>
drivers/scsi/scsi_error.c +1 -0
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/blkdev.h>
 #include <linux/delay.h>
+#include <linux/freezer.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
kernel/softirq.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/rcupdate.h>
 #include <linux/smp.h>
 #include <linux/tick.h>
+#include <linux/freezer.h>
 
 #include <asm/irq.h>
 /*
kernel/softlockup.c +1 -0
@@ -13,6 +13,7 @@
 #include <linux/kthread.h>
 #include <linux/notifier.h>
 #include <linux/module.h>
+#include <linux/freezer.h>
 
 static DEFINE_SPINLOCK(print_lock);
 
drivers/char/apm-emulation.c 2007-05-03 20:01:14.119154963 +0200 renamed from drivers/char/apm-emulation.c 2007-05-03 20:01:08.309154963 +0200 +1 -0
@@ -27,6 +27,7 @@
 #include <linux/completion.h>
 #include <linux/kthread.h>
 #include <linux/delay.h>
+#include <linux/freezer.h>
 
 #include <asm/system.h>
 
#7 lore raw
Quoted 10 lines · Johannes Berg

Hi Rafael,

Some bugs with freezer_exempt:

kernel/softirq.c: In function ‘ksoftirqd’:
kernel/softirq.c:515: warning: implicit declaration of function ‘freezer_exempt’ [...]

Maybe some header file they all use pulls in freezer.h on x86 but not on powerpc? This fixes it.

Yes, that's possible.

Thanks for the patch, I'll add it to the patchset and send it for inclusion in -mm.

Greetings,
Rafael

#4 lore raw
In reply to Johannes Berg

Hi,

Quoted 6 lines · Johannes Berg

Hi again,

I just took your whole patchset, removed two patches that wouldn't apply against Linus's current git tree, put mine for suspend to disk on G5 on top of it, then applied the freezer fix I just sent and finally tested the whole thing. It works :)

Nice to hear that. :-)

What's the current status of your patches for hibernation on G5?

Greetings,
Rafael

#5 lore raw
Quoted 1 line · Rafael J. Wysocki

What's the current status of your patches for hibernation on G5?

I sent most of them to Paul for inclusion, two of them depend on the stuff you did with pageflags so I still have four patches outstanding that I'll send once that code trickles into powerpc.

johannes

#8 lore raw
In reply to Johannes Berg

Hi,

Quoted 10 lines · Johannes Berg

Hi Rafael,

Some bugs with freezer_exempt:

kernel/softirq.c: In function ‘ksoftirqd’:
kernel/softirq.c:515: warning: implicit declaration of function ‘freezer_exempt’ [...]

Maybe some header file they all use pulls in freezer.h on x86 but not on powerpc? This fixes it.

These #includes are added by

008-add-try_to_freeze-everywhere.patch

Perhaps it's one of the patches that don't apply to the current -git?

Rafael

#9 lore raw

Hi,

Quoted 5 lines

These #includes are added by

008-add-try_to_freeze-everywhere.patch

Perhaps it's one of the patches that don't apply to the current -git?

Hmm, could be, but shouldn't the patch that adds the freezer_exempt calls add them as well?

johannes

#11 lore raw
In reply to Rafael J. Wysocki
Quoted 3 lines · Rafael J. Wysocki

Well, I'm not sure what you mean. It's on top of 008-add-try_to_freeze-everywhere.patch and the #includes are already there, so it can't just add them once again.

Ah, gotcha. Ok, sorry about the noise. I'll check it out again once you port your patchset to -rc1 or whatever you plan to do.

johannes

#10 lore raw
In reply to Johannes Berg
Quoted 10 lines · Johannes Berg

Hi,

Quoted 5 lines

These #includes are added by

008-add-try_to_freeze-everywhere.patch

Perhaps it's one of the patches that don't apply to the current -git?

Hmm, could be, but shouldn't the patch that adds the freezer_exempt calls add them as well?

Well, I'm not sure what you mean. It's on top of 008-add-try_to_freeze-everywhere.patch and the #includes are already there, so it can't just add them once again.

IOW, the ordering of patches in the patchset is important and if you drop one, you may need to replace it with another patch that does similar changes.

Greetings,
Rafael