lkml.org 
[lkml]   [2005]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] SUSPEND_PD_PAGES-fix

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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.060 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site