Re: [patch] SUSPEND_PD_PAGES-fix

From: Coywolf Qi Hunt
Date: Fri Mar 18 2005 - 11:01:30 EST


Pavel Machek wrote:
Hi!



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

-This fixes SUSPEND_PD_PAGES, which wastes one page under most cases.
+This fixes SUSPEND_PD_PAGES, which, in rare instances, would waste a signle page.


I see rafael is going to drop it. Anyway, my description was wrong.

Coywolf



Ok, applied to my tree, will eventually propagate it. (I hope it looks
okay to you, rafael).


Signed-off-by: Coywolf Qi Hunt <coywolf@xxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/