* [TRIVIAL] Drain local pages to make swsusp work
@ 2003-01-14 2:42 Rusty Trivial Russell
0 siblings, 0 replies; only message in thread
From: Rusty Trivial Russell @ 2003-01-14 2:42 UTC (permalink / raw)
To: akpm, torvalds; +Cc: Pavel Machek, linux-kernel
From: Pavel Machek <pavel@ucw.cz>
Hi!
With local pages present, swsusp's accounting goes wrong and you get
nice BUG(). This fixes it, please apply.
Pavel
--- trivial-2.5.57/kernel/suspend.c.orig 2003-01-14 12:54:30.000000000 +1100
+++ trivial-2.5.57/kernel/suspend.c 2003-01-14 12:54:30.000000000 +1100
@@ -680,6 +680,8 @@
struct sysinfo i;
unsigned int nr_needed_pages = 0;
+ drain_local_pages();
+
pagedir_nosave = NULL;
printk( "/critical section: Counting pages to copy" );
nr_copy_pages = count_and_copy_data_pages(NULL);
@@ -714,6 +716,7 @@
nr_copy_pages_check = nr_copy_pages;
pagedir_order_check = pagedir_order;
+ drain_local_pages(); /* During allocating of suspend pagedir, new cold pages may appear. Kill them */
if (nr_copy_pages != count_and_copy_data_pages(pagedir_nosave)) /* copy */
BUG();
--
Don't blame me: the Monkey is driving
File: Pavel Machek <pavel@ucw.cz>: Drain local pages to make swsusp work
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-14 2:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 2:42 [TRIVIAL] Drain local pages to make swsusp work Rusty Trivial Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome