| From: |
| Nigel Cunningham <ncunningham@clear.net.nz> |
| To: |
| swsusp-devel <swsusp-devel@lists.sourceforge.net> |
| Subject: |
| [Swsusp-devel] Announce: 1.1-rc4 |
| Date: |
| Thu, 14 Aug 2003 11:15:36 +1200 |
Hi all.
Here is patch 1.1-rc4. (3A should be reversed first).
Changes:
- Make compression work again (sorry).
- Apply async I/O limit during reloading kernel, too.
- Undo speed degradation in rc3.
- Add Karol's 8139 support patch (untested by me).
Regards,
Nigel
diff -ruN swsusp-1.1-rc3/drivers/net/8139too.c swsusp-1.1-rc4/drivers/net/8139too.c
--- swsusp-1.1-rc3/drivers/net/8139too.c 2003-08-14 11:10:37.000000000 +1200
+++ swsusp-1.1-rc4/drivers/net/8139too.c 2003-08-14 11:10:39.000000000 +1200
@@ -2573,6 +2573,9 @@
tp->stats.rx_missed_errors += RTL_R32 (RxMissed);
RTL_W32 (RxMissed, 0);
+ pci_save_state (pdev, tp->pci_state);
+ pci_set_power_state (pdev, 3);
+
spin_unlock_irqrestore (&tp->lock, flags);
return 0;
}
@@ -2581,11 +2584,15 @@
static int rtl8139_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
+ struct rtl8139_private *tp = dev->priv;
if (!netif_running (dev))
return 0;
- netif_device_attach (dev);
+ pci_set_power_state (pdev, 0);
+ pci_restore_state (pdev, tp->pci_state);
+ rtl8139_init_ring (dev);
rtl8139_hw_start (dev);
+ netif_device_attach (dev);
return 0;
}
diff -ruN swsusp-1.1-rc3/fs/buffer.c swsusp-1.1-rc4/fs/buffer.c
--- swsusp-1.1-rc3/fs/buffer.c 2003-08-14 11:10:38.000000000 +1200
+++ swsusp-1.1-rc4/fs/buffer.c 2003-08-14 11:10:39.000000000 +1200
@@ -1276,7 +1276,6 @@
#ifdef CONFIG_SOFTWARE_SUSPEND
extern void cleanup_finished_swsusp_io(void);
-extern void sync_swap_partitions(void);
#endif
static struct buffer_head * create_buffers(struct page * page, unsigned long size, int async)
@@ -1345,10 +1344,8 @@
free_more_memory();
#ifdef CONFIG_SOFTWARE_SUSPEND
- if (suspend_task == current->pid) {
+ if (suspend_task == current->pid)
cleanup_finished_swsusp_io();
- sync_swap_partitions();
- }
#endif
goto try_again;
}
diff -ruN swsusp-1.1-rc3/include/linux/suspend-debug.h swsusp-1.1-rc4/include/linux/suspend-debug.h
--- swsusp-1.1-rc3/include/linux/suspend-debug.h 2003-08-14 11:10:38.000000000 +1200
+++ swsusp-1.1-rc4/include/linux/suspend-debug.h 2003-08-14 11:10:39.000000000 +1200
@@ -6,7 +6,7 @@
#define name_suspend "Suspend Machine: "
#define name_resume "Resume Machine: "
-#define swsusp_version "1.1-rc3"
+#define swsusp_version "1.1-rc4"
#define name_swsusp "Swsusp " swsusp_version ": "
#define console_suspend " S U S P E N D T O D I S K " /* Same length to ensure one overwrites the other */
#define console_resume "R E S U M E F R O M D I S K"
diff -ruN swsusp-1.1-rc3/kernel/suspend/io.c swsusp-1.1-rc4/kernel/suspend/io.c
--- swsusp-1.1-rc3/kernel/suspend/io.c 2003-08-14 11:10:38.000000000 +1200
+++ swsusp-1.1-rc4/kernel/suspend/io.c 2003-08-14 11:10:39.000000000 +1200
@@ -58,6 +58,7 @@
sh->param2 = swsusp_debug_state;
#endif
sh->param3 = console_loglevel;
+ sh->param4 = max_async_ios;
#if defined(CONFIG_FBCON_SPLASHSCREEN)
sh->progress0 = fb_splash_progress[0];
sh->progress1 = fb_splash_progress[1];
@@ -189,14 +190,19 @@
#ifdef CONFIG_SOFTWARE_SUSPEND_COMPRESSION
if (!TEST_ACTION_STATE(SUSPEND_NO_COMPRESSION)) {
+ SET_SHOW_PAGE_ALLOCS(0);
compression_buffer = get_zeroed_page(GFP_ATOMIC);
+ RESET_SHOW_PAGE_ALLOCS();
if (!compression_buffer) {
printk(KERN_ERR name_suspend "Failed to allocate memory for compression buffer.\n");
return -1;
}
- if (prepare_zlib_deflate_memory()) {
+ SET_SHOW_PAGE_ALLOCS(0);
+ i = prepare_zlib_deflate_memory();
+ RESET_SHOW_PAGE_ALLOCS();
+ if (i) {
printk(KERN_ERR name_suspend "Failed to allocate memory for zlib to work in.\n");
free_pages(compression_buffer, 0);
return -1;
@@ -210,8 +216,10 @@
if (Z_OK != zlib_deflateInit(&strm, Z_BEST_SPEED)) {
printk(KERN_ERR name_suspend "Failed to initialise zlib.\n");
+ SET_SHOW_PAGE_ALLOCS(0);
release_zlib_memory();
free_pages(compression_buffer, 0);
+ RESET_SHOW_PAGE_ALLOCS();
return -1;
}
get_first_pbe(&swap_pbe, pagedir);
@@ -326,8 +334,10 @@
#ifdef CONFIG_SOFTWARE_SUSPEND_COMPRESSION
if (!TEST_ACTION_STATE(SUSPEND_NO_COMPRESSION)) {
+ SET_SHOW_PAGE_ALLOCS(0);
release_zlib_memory();
free_pages(compression_buffer, 0);
+ RESET_SHOW_PAGE_ALLOCS();
}
#endif
PRINTFREEMEM("at end of write pageset");
@@ -392,16 +402,23 @@
#ifdef CONFIG_SOFTWARE_SUSPEND_COMPRESSION
if (!TEST_ACTION_STATE(SUSPEND_NO_COMPRESSION)) {
+ SET_SHOW_PAGE_ALLOCS(0);
compression_buffer = get_zeroed_page(GFP_ATOMIC);
+ RESET_SHOW_PAGE_ALLOCS();
if (!compression_buffer) {
printk(KERN_ERR name_suspend "Failed to allocate memory for compression buffer.\n");
return -1;
}
- if (prepare_zlib_inflate_memory()) {
+ SET_SHOW_PAGE_ALLOCS(0);
+ i = prepare_zlib_inflate_memory();
+ RESET_SHOW_PAGE_ALLOCS();
+ if (i) {
printk(KERN_ERR name_suspend "Failed to allocate memory to write the pageset.\n");
+ SET_SHOW_PAGE_ALLOCS(0);
free_pages(compression_buffer, 0);
+ RESET_SHOW_PAGE_ALLOCS();
return -1;
}
@@ -412,7 +429,9 @@
if (Z_OK != zlib_inflateInit(&strm)) {
printk(KERN_ERR name_suspend "Failed to initialise zlib.\n");
+ SET_SHOW_PAGE_ALLOCS(0);
free_pages(compression_buffer, 0);
+ RESET_SHOW_PAGE_ALLOCS();
goto read_pageset_free_buffers;
}
@@ -442,7 +461,8 @@
/* Get next page of the compressed image */
readpbe.swap_address = swap_pbe.swap_address;
readpbe.swap_bdev = swap_pbe.swap_bdev;
- readpbe.block = swap_pbe.block;
+ for (i = 0; i < swap_pbe.blocksperpage; i++)
+ readpbe.block[i] = swap_pbe.block[i];
readpbe.address = virt_to_page(compression_buffer);
ret2 = bdev_read_swap(&readpbe, 0);
if (ret2)
@@ -501,8 +521,10 @@
#ifdef CONFIG_SOFTWARE_SUSPEND_COMPRESSION
if (!TEST_ACTION_STATE(SUSPEND_NO_COMPRESSION)) {
+ SET_SHOW_PAGE_ALLOCS(0);
release_zlib_memory();
free_pages(compression_buffer, 0);
+ RESET_SHOW_PAGE_ALLOCS();
}
#endif
PRINTFREEMEM("at end of read pageset");
@@ -886,6 +908,7 @@
#endif
if (!swsusp_lvl_used)
console_loglevel = diskpage.pointer->sh.param3;
+ max_async_ios = diskpage.pointer->sh.param4;
#if defined(CONFIG_FBCON_SPLASHSCREEN)
fb_splash_progress[0] = diskpage.pointer->sh.progress0;
fb_splash_progress[1] = diskpage.pointer->sh.progress1;
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
swsusp-devel mailing list
swsusp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swsusp-devel