From: Pavel Machek <pavel@ucw.cz>
To: torvalds@transmeta.com, kernel list <linux-kernel@vger.kernel.org>
Subject: swsusp updates
Date: Sat, 21 Sep 2002 23:12:51 +0200 [thread overview]
Message-ID: <20020921211251.GA31803@elf.ucw.cz> (raw)
Hi!
Small updates to documentation, sanity checks turned into BUG_ONs to
save space, fix recovery on resume error. Please apply,
Pavel
--- clean/Documentation/swsusp.txt 2002-07-09 04:54:06.000000000 +0200
+++ linux-swsusp/Documentation/swsusp.txt 2002-09-13 19:12:59.000000000 +0200
@@ -148,7 +148,7 @@
corrupts the virtual console of X.. (Maybe this has been fixed AFAIK).
Drivers we support
-- IDE disks are okay
+- IDE disks are okay... Were okay before Andre's ide came back.
- vesafb
Drivers that need support
@@ -156,6 +156,23 @@
- do IDE cdroms need some kind of support?
- IDE CD-RW -- how to deal with that?
+FAQ:
+
+Q: well, suspending a server is IMHO a really stupid thing,
+but... (Diego Zuccato):
+
+A: You bought new UPS for your server. How do you install it without
+bringing machine down? Suspend to disk, rearrange power cables,
+resume.
+
+You have your server on UPS. Power died, and UPS is indicating 30
+seconds to failure. What do you do? Suspend to disk.
+
+Ethernet card in your server died. You want to replace it. Your
+server is not hotplug capable. What do you do? Suspend to disk,
+replace ethernet card, resume. If you are fast your users will not
+even see broken connections.
+
Any other idea you might have tell me!
Contacting the author
--- clean/kernel/suspend.c 2002-09-21 13:20:46.000000000 +0200
+++ linux-swsusp/kernel/suspend.c 2002-09-21 13:25:41.000000000 +0200
@@ -472,16 +472,17 @@
int pfn;
struct page *page;
- if (max_mapnr != num_physpages)
- panic("mapnr is not expected");
+ BUG_ON (max_mapnr != num_physpages);
for (pfn = 0; pfn < max_mapnr; pfn++) {
page = pfn_to_page(pfn);
if (PageHighMem(page))
panic("Swsusp not supported on highmem boxes. Send 1GB of RAM to <pavel@ucw.cz> and try again ;-).");
+
if (!PageReserved(page)) {
if (PageNosave(page))
continue;
+
if ((chunk_size=is_head_of_free_region(page))!=0) {
pfn += chunk_size - 1;
continue;
@@ -774,9 +785,10 @@
BUG_ON (nr_copy_pages_check != nr_copy_pages);
BUG_ON (pagedir_order_check != pagedir_order);
+ __flush_tlb_global(); /* Even mappings of "global" things (vmalloc) need to be fixed */
+
PRINTK( "Freeing prev allocated pagedir\n" );
free_suspend_pagedir((unsigned long) pagedir_save);
- __flush_tlb_global(); /* Even mappings of "global" things (vmalloc) need to be fixed */
drivers_resume(RESUME_ALL_PHASES);
spin_unlock_irq(&suspend_pagedir_lock);
@@ -807,12 +819,10 @@
barrier();
mb();
- drivers_resume(RESUME_PHASE2);
spin_lock_irq(&suspend_pagedir_lock); /* Done to disable interrupts */
mdelay(1000);
free_pages((unsigned long) pagedir_nosave, pagedir_order);
- drivers_resume(RESUME_PHASE1);
spin_unlock_irq(&suspend_pagedir_lock);
mark_swapfiles(((swp_entry_t) {0}), MARK_SWAP_RESUME);
PRINTK(KERN_WARNING "%sLeaving do_magic_suspend_2...\n", name_suspend);
@@ -1035,6 +1045,7 @@
return 0;
#endif
printk(KERN_CRIT "%sWarning %s: Fixing swap signatures unimplemented...\n", name_resume, resume_file);
+ return 0;
}
extern kdev_t __init name_to_kdev_t(const char *line);
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
next reply other threads:[~2002-09-22 20:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-21 21:12 Pavel Machek [this message]
2002-10-29 23:15 Pavel Machek
2003-07-26 20:45 Pavel Machek
2003-07-26 21:05 ` Patrick Mochel
2003-07-26 21:03 ` Pavel Machek
2003-07-26 21:09 ` Patrick Mochel
2003-07-26 21:13 ` Pavel Machek
2003-07-26 21:31 ` Patrick Mochel
2003-07-26 21:35 ` Pavel Machek
2003-07-26 21:37 ` Pavel Machek
2003-08-04 20:14 Pavel Machek
2003-08-04 20:43 ` Andrew Morton
2003-08-04 22:13 ` Pavel Machek
2003-08-04 22:27 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020921211251.GA31803@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®