Skip to contentSkip to conversation

Announce: Software Suspend 2.0rc3 for 2.4 and 2.6.

DISCUSSION Nigel Cunningham 2 participants 3 messages Dec 10, 2003 – Dec 11, 2003

lore
Share & tools
lore
#0 lore raw

Hi all.

This is to announce 2.0-rc3, now being uploaded to swsusp.sf.net.

A number of small but significant user-visible changes have been made with this release, so please read these notes carefully.

1) New format. There is now one 'core' patch which should be applied regardless of your kernel version. In addition to the core patch, a version-specific patch should be applied. These are available for both 2.4 and 2.6 series kernels. Core and version-specific patches should be able to be updated independently.

PARTICULARLY IN THE CASE OF 2.6, THE VERSION SPECIFIC PATCH SHOULD BE APPLIED FIRST. Otherwise, rejects will occur.

2) Changed kernel command line parameters. Instead of resume=, resume_block= and resume_blocksize=, there is now a single resume2= command line parameter. Note that that's RESUME2, not RESUME. The format for this parameter is:

resume2=[writer]:[writer-specific-parameters]

At the moment, there is only one method of storing images - the swapwriter. It is envisaged, that NFS support will be implemented sometime in the future. (After I do the work of merging with Patrick). For now, then, you will want to replace

resume=/dev/hda1 resume_block=0x560 resume_blocksize=1024

with

resume2=swap:/dev/hda1:0x560@1024

Later, you'll hopefully end up being able to have
resume2=nfs:192.168.1.1/images/laptop.

3) /proc/sys/kernel/swsusp is now deprecated. It is still in this version, but I'd appreciate it if scripts could be changed to use the new /proc/swsusp/all_settings entry instead. The functionality is exactly the same. Only the location has changed.

In addition, a ton of user-invisible changes have been made. This accounts for the size of the patch. A new internal API implements two new kinds of 'plugins', designed to make adding new methods of transforming the data to be stored ('transformers') and saving the data ('writers') easier to implement. This has allowed me to separate out the swap specific code and the compression code as part of the big cleanup I've also done. The /proc code has also been enhanced, so that plugins can dynamically register new entries. This will also form a foundation for kobject support in the 2.6 kernel. (That is to say, 2.6 swsusp will soon stop using proc, and will use sysfs instead).

4) Compatibility with other 2.6 implementations.

This version should play nicely with the existing software suspend implementations in the 2.6 kernel. Patrick's pmdisk implementation can be activated as always using the sysfs interface, and Pavel's using echo 4 > /proc/acpi/sleep. This patch does replace the freezer implementation those versions use, and Pavel's suspend will initialise but not use the nice display. Apart from these minor changes, no differences should be seen.

For those who simply with to upgrade from rc2, an incremental patch is also available from Sourceforge. I've put it there rather than attaching it because of its size.

Apart from the kobject changes mentioned above, this should be the last set of big changes to the code base. Unless something has slipped my mind, I believe I've just about implemented all the functionality we need. From now on, then, I'll only be looking to update/improve the documentation and clean and further document the code, to implement kobject support and perhaps also SMP support (which should be a minor changeset).

As always, I look forward to feedback.

Regards,

Nigel

Signature · 5 lines
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

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

Thus wrote Nigel Cunningham:

Quoted 1 line

This is to announce 2.0-rc3, now being uploaded to swsusp.sf.net.

Hi,
I've just tested it on 2.4.23 as well -- no problems found, although the XFS option patch needs updating -- probably as much as the 2.6 XFS code (though the latter seems to suspend... I'll get to it later today). Attached is the patch to bring the XFS code for 2.4 up to date (note: this is not the whole xfs-option, it should be applied on top of the latter; I can prepare a complete xfs-option if you care).

Oh, BTW: the slowdown I mentioned for 2.6 seems to hit this version also, but in a different manner: I/O is fine, but the resuming kernel spends some time on displaying "Freezing processes" -- what was unnoticeable under rc2 is somewhat awkward with rc3.

Best regards,

Signature · 2 lines
Karol 'sziwan' Kozimor
[email protected]
xfs/pagebuf/page_buf.c renamed from xfs/pagebuf/page_buf.c~ +4 -4
@@ -1645,11 +1645,11 @@
 	current->flags |= PF_MEMALLOC;
 
 	SWSUSP_THREAD_FLAGS_RESET;
-	SWSUSP_ACTIVITY_START;
+	SWSUSP_ACTIVITY_START(PF_SYNCTHREAD);
 
 	INIT_LIST_HEAD(&tmp);
 	do {
-		SWSUSP_ACTIVITY_PAUSING;
+		SWSUSP_ACTIVITY_SYNCTHREAD_PAUSING;
 
 		if (pbd_active == 1) {
 			mod_timer(&pb_daemon_timer,
@@ -1661,7 +1661,7 @@
 			del_timer_sync(&pb_daemon_timer);
 		}
 
-		SWSUSP_ACTIVITY_RESTARTING;
+		SWSUSP_ACTIVITY_RESTARTING(PF_SYNCTHREAD);
 		spin_lock(&pbd_delwrite_lock);
 
 		count = 0;
@@ -2096,7 +2096,7 @@
 
 		if (TQ_ACTIVE(pagebuf_iodone_tq[cpu]))
 			__set_task_state(current, TASK_RUNNING);
-		SWSUSP_ACTIVITY_PAUSING;
+		SWSUSP_ACTIVITY_SYNCTHREAD_PAUSING;
 		schedule();
 		SWSUSP_ACTIVITY_RESTARTING(PF_SYNCTHREAD);
 		remove_wait_queue(&pagebuf_iodone_wait[cpu], &wait);
xfs/linux/xfs_super.c renamed from xfs/linux/xfs_super.c~ +3 -3
@@ -444,13 +444,13 @@
 	wake_up(&vfsp->vfs_wait_sync_task);
 
 	SWSUSP_THREAD_FLAGS_RESET;
-	SWSUSP_ACTIVITY_START;
+	SWSUSP_ACTIVITY_START(PF_SYNCTHREAD);
 
 	for (;;) {
-		SWSUSP_ACTIVITY_PAUSING;
+		SWSUSP_ACTIVITY_SYNCTHREAD_PAUSING;
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(xfs_syncd_interval);
-		SWSUSP_ACTIVITY_RESTARTING;
+		SWSUSP_ACTIVITY_RESTARTING(PF_SYNCTHREAD);
 		if (vfsp->vfs_flag & VFS_UMOUNT)
 			break;
 		if (vfsp->vfs_flag & VFS_RDONLY)
#2 lore raw

My fault for using Bootsplash too much :> When it's stopping on 'Freezing processes' during resume that's because as well as freezing the processes, it's copying the original kernel back. I'll make it display the correct message.

Regards,

Nigel

Quoted 17 lines · Karol Kozimor

Thus wrote Nigel Cunningham:

Quoted 1 line

This is to announce 2.0-rc3, now being uploaded to swsusp.sf.net.

Hi,
I've just tested it on 2.4.23 as well -- no problems found, although the XFS option patch needs updating -- probably as much as the 2.6 XFS code (though the latter seems to suspend... I'll get to it later today). Attached is the patch to bring the XFS code for 2.4 up to date (note: this is not the whole xfs-option, it should be applied on top of the latter; I can prepare a complete xfs-option if you care).

Oh, BTW: the slowdown I mentioned for 2.6 seems to hit this version also, but in a different manner: I/O is fine, but the resuming kernel spends some time on displaying "Freezing processes" -- what was unnoticeable under rc2 is somewhat awkward with rc3.

Best regards,

Signature · 2 lines
My work on Software Suspend is graciously brought to you by
LinuxFund.org.