Messages in this thread Patch in this message | | | Date | Wed, 16 Mar 2005 15:28:00 -0500 | From | Coywolf Qi Hunt <> | 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/
| |