public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] SUSPEND_PD_PAGES-fix
@ 2005-03-16 20:28 Coywolf Qi Hunt
  2005-03-18 11:39 ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Coywolf Qi Hunt @ 2005-03-16 20:28 UTC (permalink / raw)
  To: pavel; +Cc: akpm, linux-kernel


Hello,

This fixes SUSPEND_PD_PAGES, which wastes one page under most cases.


	Coywolf


Signed-off-by: Coywolf Qi Hunt <coywolf@gmail.com>
diff -pruN 2.6.11-mm4/include/linux/suspend.h 2.6.11-mm4-cy/include/linux/suspend.h
--- 2.6.11-mm4/include/linux/suspend.h	2005-03-17 01:22:16.000000000 +0800
+++ 2.6.11-mm4-cy/include/linux/suspend.h	2005-03-17 04:14:16.000000000 +0800
@@ -34,7 +34,7 @@ typedef struct pbe {
 #define SWAP_FILENAME_MAXLENGTH	32
 
 
-#define SUSPEND_PD_PAGES(x)     (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
+#define SUSPEND_PD_PAGES(x)     (((x)*sizeof(struct pbe)+PAGE_SIZE-1)/PAGE_SIZE)
 
 extern dev_t swsusp_resume_device;
    

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-19  0:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16 20:28 [patch] SUSPEND_PD_PAGES-fix Coywolf Qi Hunt
2005-03-18 11:39 ` Pavel Machek
2005-03-18 13:34   ` Rafael J. Wysocki
2005-03-18 18:56     ` Rafael J. Wysocki
2005-03-19  0:02       ` Pavel Machek
2005-03-18 15:56   ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox